Lon*_*est 18 restore duplicity
使用 duplicity 命令,我需要指定以下内容:
如何使用 duplicity 命令指定这 3 件事?
Bah*_*mir 20
这是正确的,即使它告诉“--file-to-restore”,您也可以在“文件夹名”处输入任何文件或文件夹路径(开头没有“/”符号,例如“temp/logs”)以及命令的任何“目标文件夹”(开头带有“/”符号,例如“/temp/logs”)。
示例:我想将 3 天前备份的 /temp/logs 恢复到同一文件夹中:
duplicity -t 3D --file-to-restore temp/logs file:///backup/location /temp/logs
Run Code Online (Sandbox Code Playgroud)
示例 2:我想将 3 天前备份的文件 /temp/logs/app-error.log 恢复到同一文件夹中:
duplicity -t 3D --file-to-restore temp/logs/app-error.log file:///backup/location /temp/logs/app-error.log
Run Code Online (Sandbox Code Playgroud)
请注意,您必须为文件提供完整的目标路径。
示例 3:我的备份位于 ftp server=my.ftp.server 且 user=root 位于 location=my_backup,与 #1 相同的场景:
duplicity -t 3D --file-to-restore temp/logs sftp://root@my.ftp.server/my_backup /temp/logs
Run Code Online (Sandbox Code Playgroud)
Jan*_*Jan 10
duplicity -t 3D --file-to-restore <foldername> file:///backup/location <destination folder>
Run Code Online (Sandbox Code Playgroud)
Duplicity 进入还原模式,因为 URL 出现在本地目录之前。
-t 3D 3天前
如果您想查看更多信息,以下是不同版本的有用链接: