简体   繁体   中英

Restore only changed files with duplicity

I've a problem. Duplicity is perfect for backups, I love so much that can be able to do incremental diff tars, but ... when restoring duplicity seems don't apply same concept.

Basically I need to restore only changed files (obviously after a full backup) but I can't figure how do that.

When I try to restore a directory I get:

Restore destination directory /Volumes/Data/Backups/Srv1 already exists.

I need to backup a directory (and I don't have any problems in doing that) and setup a mirror on another machine.

Thanks!

First of all, duplicity doesn't overwrite anything when restoring. So your <target_folder> must not exist.

To your actual question: This sounds like a job for rsync and not for duplicity. Is there an actual reason the mirror needs to be generated from the backup and not from the source?

I guess it should be possible to write a shell script which compiles a list of changed files from the duplicity manifest file ( duplicity-inc.<timestamp>.to.<timestamp>.manifest , can also be found in ~/.cache/duplicity/ ) and feeds it to the --files-to-restore option. But it can quickly lead to other problems, like hitting you shell's line length limit and having to accommodate for special characters in file names and so on.

Restore syntax for reference:
duplicity restore [--file-to-restore <relpath>] [--time <time>] <url> <target_folder>

Edit:
Oh my, just seen how old the question is ;-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM