Obnam should support multiple repositories, to be chosen at invocation time.
- all repositories configured in config files
- nicknames for repositories so it's easy to choose
- --repository should accept nicknames
- choose many repositories for one run
- use all available repositories by default
--liw
Could this also be achieved by running Obnam from a wrapper script that uses a different repository for each run? Could Obnam be run in parallel instances backing up the same data to different repos? Is that possible now? --Adam
Adam, it can certainly be done by using wrapper scripts (I've been doing that), and while I haven't actually tried it, there should be no problem with backing up to multiple repositories concurrently, though you may need to fiddle with the configs so that they use different log files. --liw
After some thinking, I think I don't want nicknames for repositories, I want "profiles".Here's a concrete suggestion:
[config]
encrypt-with = CAFEF00D
profile = all
log = /var/log/obnam/obnam-%(profile)s.log
[profile "online"]
repository = sftp://liw@personal.backup.server.example.com/~/repo/
use-if = ping -c1 personal.backup.server.example.com
[profile "usb-drive"]
repository = /media/Drum/obnam-repo/
use-if = test -d /media/Drum/obnam-repo/
[profile "at-work"]
repository = /mnt/backups/
use-if = ping -c1 fs.work.example.com
pre-command = sudo mount /mnt/backups
post-command = sudo umount /mnt/backups
- if --profile=all, then iterate automatically over all profiles
- otherwise, use only the chosen profiles
- some day: run some/all profiles in parallel in one obnam instance; initially, user may run parallel obnam instances
- log file should embed profile name somehow
- should profile be selected based on user too? that can be done with "use-if = test $USER = liw"; better support can be added later, if there's a need
--liw
this is handled easily by having a set of config files and giving the "profile" one to --config. done --liw