How to restore folders to their original destination using duplicity?
11
votes
1
answer
14934
views
After performing a backup of a couple of directories like so:
# duplicity\
--exclude /home/user/Documents/test1/file\
--include /home/user/Documents/test1\
--include /tmp/test2\
--exclude '**'\
/ file:///home/user/Backup
I wanted to test how the restoration works by deleting the backed up directories:
# rm -rf /home/user/Documents/test1 /tmp/test2
And then, restoring the backup,
# duplicity file:///home/user/Backup /
But I got the error,
Restore destination directory / already exists.
Will not overwrite.
So it appears that I can't restore to the original destination without emptying the root folder even though the destination of these included folders have already been cleared.
Is there a better way than to restore it to another location and then moving each folder one by one?
# duplicity --file-to-restore home/user/Documents/test1 file:///home/user/Backup /home/user/Restore1
# mv /home/user/Restore1/home/user/Documents/test1 /home/user/Documents/test1
# duplicity --file-to-restore tmp/test2 file:///home/user/Backup /home/user/Restore2
# mv /home/user/Restore2/tmp/test2 /tmp/test2
Asked by Question Overflow
(4818 rep)
Feb 8, 2014, 11:16 AM
Last activity: Sep 20, 2021, 09:22 PM
Last activity: Sep 20, 2021, 09:22 PM