borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
11.22k stars 743 forks source link

--strip-components options for recreate #1650

Open RonnyPfannschmidt opened 8 years ago

RonnyPfannschmidt commented 8 years ago

hi,

the use case is the following i took borg archives that contain sets of old backups, and those i want to split out and simplify

the flow i imagine is the following

  1. for each backup folder run a recreate including only the backup folders at their new location something like --only home/old_backuos/somedate --strip-components 3
  2. for each containing backup run a recreate --exclude home/old_backuos/somedate

im willing to implement once NixOS/nixpkgs#18970 is fixed

RonnyPfannschmidt commented 8 years ago

irc discussion with @ThomasWaldmann pointed out that this might make recreate too complex

perhaps different options are needed

textshell commented 8 years ago

I proposed on irc that we might just do a command that exports a whole archive as json (optionally including the chunk ids or the data). And have a second command that would import such a json (with a different name, not overwriting anything), checking that all chunk ids referenced are still in the repository. That would instantly allow for all kinds of crazy manipulation to be scripted or even allow someone to do a gui or web tool.

RonnyPfannschmidt commented 7 years ago

the path parameter is already solving the `-only`` case