Backup 2 specific directories with duplicity

duplicity

I used to backup directory /home/user/X with duplicity using

duplicity /home/user/X/ file:///home/user/Backup/ 

Now, I want to backup directories /home/user/X/ and /home/user/Y/ and ignore ANYTHING else under /home/user/ (other directories, hidden files in /home/user/)

Which is the appropriate way to specify this? Intuitively i would use

duplicity --include /home/user/X/ --include /home/user/Y/ --exclude '**' file:///home/user/Backup/ 

but it throws an error (Command line error: Expected 2 args, got 1).

I used duplicity /home/user/ --include /home/user/X/ --include /home/user/Y/ --exclude '**' file:///home/user/Backup/

but it produces a 10GB incremental backup for a 300MB delta file

When I use the –dry-run I get a note of

RawDeltaSize 0 (0 bytes)
TotalDestinationSizeChange 0 (0 bytes)
Errors 0

Is there something that I am missing or mis-specifying in the duplicity syntax? Why does –dry-run show 0 Delta size while why I run the command I get at least 10Gb of incrementals? Is it because I am adding a new directory than produces these large incrementals?

PS. I am also using the –allow-source-mismatch switch

Best Answer

I'm not sure why as I am not at my computer at the moment, but for my backup, I use

    --exclude '**' / file:...

You seem to be missing the slash arg.

Related Topic