Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.
/ borg2restic Public archive

A tool to help convert a borg repository to restic.

License

Notifications You must be signed in to change notification settings

flokli/borg2restic

Repository files navigation

borg2restic

A tool to help convert a borg repository to restic.

It assumes the following environment variables to be set:

  • BORG_REPO set to the old borg repository
  • RESTIC_REPOSITORY set to the restic repository

It is highly recommended to also set BORG_PASSPHRASE (or BORG_PASSCOMMAND), and RESTIC_PASSWORD[_FILE] to allow non-interactive access to the two repositories.

It will mount the borg repository, collect a list of all snapshots, and will invoke restic to "back up from the mountpoint".

It does this by changing the working directory of the restic process to the location of the mounted borg contents (and an optional subpath in there).

Additionally, the path shown in restic snapshots can be overridden, so it doesn't show artifacts from the conversion. This needs the version of restic in $PATH to have restic/restic#3200 applied.

Timestamps are preserved (to the best of my knowledge). It's also possible to explicitly set the hostname for the restic backup command.

Check the --help output for more help.

About

A tool to help convert a borg repository to restic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages