0

I have a duplicity backup script running under Ubuntu 18.04 which has backed up the contents of my /etc directory like this:

duplicity --archive-dir=/home/bkp/.cache /etc rsync://backup.host::/bkp/etc

I now want to restore the /etc/postfix directory from that. But when I try to restore it with:

duplicity restore rsync://backup.host::/bkp/etc/postfix ./postfix.restored

it says:

rsync: change_dir "/etc/postfix" (in bkp) failed: No such file or directory (2)

If I do duplicity list-current-files on the /etc backup I can see it's there though. I can't see anything in the man page about this though.

TommyPeanuts
  • 399
  • 1
  • 5
  • 23

1 Answers1

1

duplicity backups are no file system, so you cannot navigate them this intuitively. from the duplicity man page

--file-to-restore path

This option may be given in restore mode, causing only path to be restored instead of the entire contents of the backup archive. path should be given relative to the root of the directory backed up.

so in your case the command should look something like

duplicity restore --file-to-restore 'postfix' rsync://backup.host::/bkp/etc ./postfix.restored

..good luck ede/duply.net

ede-duply.net
  • 299
  • 1
  • 2