包含绝对路径时口是心非的 FilePrefixError

Duplicity FilePrefixError When Including Absolute Path

当我决定在我的备份中包含其他文件夹时,我 运行 遇到了一个错误,我想知道如何更正它。

我的完整 duplicity 命令是

duplicity \
    --include='/home/MINE/Shareable**' \
    --include='/home/MINE/Pictures**' \
    --volsize 10 \
    --s3-multipart-chunk-size 5 \
    --s3-use-new-style \
    --asynchronous-upload \
    /home/MINE/webapps/webapp2 \
    s3://s3.amazonaws.com//MYBACKUP/MYMACHINE/apps/MINE/webapp2 \
    --full-if-older-than 30D

如果我不包含 --include 参数,它运行正常,一旦包含它们,我就会收到 FilePrefixError: /home/MINE/Shareable**.

是的,所有这些路径都存在。对我来说,似乎口是心非是期望包含的路径是相对于 /home/MINE/webapps/webapp2 而不是绝对路径。

我该如何纠正?

注意

duplicity \
    --exclude='*' \
    --include='/home/MINE/Shareable**' \
    --include='/home/MINE/Pictures**' \
    --volsize 10 \
    --s3-multipart-chunk-size 5 \
    --s3-use-new-style \
    --asynchronous-upload \
    /home/MINE/webapps/webapp2 \
    s3://s3.amazonaws.com//MYBACKUP/MYMACHINE/apps/MINE/webapp2 \
    --full-if-older-than 30D

以新消息结束:

Last selection expression:
    Command-line include glob: /home/MINE/Pictures**
only specifies that files be included.  Because the default is to
include all files, the expression is redundant.  Exiting because this
probably isn't what you meant.

知道了。

我需要切换包含和排除的顺序

duplicity \
    --include='/home/MINE/Shareable' \
    --include='/home/MINE/Pictures' \
    --exclude='**' \
    --volsize 10 \
    --s3-multipart-chunk-size 5 \
    --s3-use-new-style \
    --asynchronous-upload \
    /home/MINE/webapps/webapp2 \
    s3://s3.amazonaws.com//MYBACKUP/MYMACHINE/apps/MINE/webapp2 \
    --full-if-older-than 30D