0

By using the command below, I intended to exclude three types of an archive with a name that consists of Backup, however, the files still get copied. Any idea what's the mistake?

   duplicity --encrypt-key somekey --verbosity 8 --rsync-options "-avPt --delete --delete-excluded --exclude="*Backup*."{zip,tar,xz} --include="*/" --include="*" --rsync-path="sudo rsync"" source dest

I realize the --exclude flag from duplicity exist, but rsync's more suit to my needs (multiple combinations of the flags achieve what I want). This will only be my last resort if using rsync's own flag is impossible.

Gregor Isack
  • 1,111
  • 12
  • 25

1 Answers1

0

duplicity will only use your --rsync-options if your destination url has the form rsync://....

Also, the command you give above is using double-quotes inside double-quotes, which may not work as you intended. Looking at the sources, in backend.py we see that python shlex is used to parse the command line that you provide via --rsync-options. It seems therefore that you can use single quotes to quote each separate argument, including the one with spaces: --rsync-path='sudo rsync'.

meuh
  • 11,500
  • 2
  • 29
  • 45