[英]Absolute path of File object in Java is different when launching from commandline
[英]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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.