是否有可能将远程目录备份到本地path?
在命令中使用两个URL引发
Two URLs specified. One argument should be a path.
只使用一个遥控器,但指定full选项引发
--full option cannot be used when restoring or verifying
我试过的样子
duplicity full ssh://username@remote:XXXX/home/username /media/removabledrive/
XXXX是ssh的自定义端口。
为什么不把远程path使用sshfs,cifs,nfs或您select的其他工具挂载到本地文件系统树?
如果你这样做,你可以指定两个本地path来实现重复,而且不应该注意到其中一个path实际上是在一个远程节点上的(确保你select了远程文件系统,还要确保你使用了正确的挂载选项 – 这对于samba / cifs来说是非常重要的,因为它的默认值不是非常unix-ish)。
对于Debian或Debian衍生产品(如Ubuntu):
apt-get install sshfs
然后:
mkdir -p / mnt / remote && sshfs username @ remote:/ home / username / mnt / remote
成功之后,请执行从/mnt/remote到您的本地备份path的备份
umount / mnt / remote
还要检查man sshfs ,看看哪些选项可能适用于您的用例。
Duplicity不支持远程资源,因此没有办法像@ blubberdiblubbuild议的那样做。
当我发现这个问题的时候,我感到失望,尽pipe他们并不把这当作一个问题: https : //answers.launchpad.net/duplicity/+question/143932
据我所知,提供远程path后跟本地path施加恢复数据,这应该是一个完全恢复默认情况下。
“完整”参数仅适用于进行备份:
full Indicate full backup. If this is set, perform full backup even if signatures are available. incr If this is requested an incremental backup will be performed. Duplicity will abort if old signatures cannot be found. The default is to switch to full backup under these conditions.
所以这个命令: duplicity full /home/me scp://[email protected]/some_dir会将/ home / me的完整备份到远程主机/ some_dir。 Full / incr仅适用于MAKING备份,不能恢复。
如果您只想恢复某个path,请使用:
– 文件还原path此选项可以在还原模式下给出,导致只有path被还原,而不是备份存档的全部内容。 path应该是相对于备份目录的根目录而言的。
根据这里的文档: http : //manpages.ubuntu.com/manpages/oneiric/man1/duplicity.1.html ,会发生什么是:
恢复时,重复按顺序应用修补程序,因此删除例如完整备份集可能会使相关的增量备份集不可用。
还有最后一句关于“ssh://”的部分。 根据文档,尝试使用scp / sftp:
关于SSH / SCP协议的说明
Duplicity specifies two protocol names for the same protocol. This is a known and user-confusing issue. Both use the same protocol suite, namely ssh through its' utility routines scp and sftp. Older versions of duplicity used scp for get and put operations and sftp for list and delete operations. The current version uses sftp for all four supported operations, unless the --use-scp option is used to revert to old behavior. The change was made to all-sftp in order to allow the remote system to chroot the backup, thus providing better security.
看看这里的文档: http : //duplicity.nongnu.org/docs.html看起来你应该发出这样的:
duplicity full ssh://username@remote:XXXX//home/username /media/removabledrive/
请注意在host:port之后的double //