将 tarsnap 存档恢复到特定文件夹

arv*_*idj 4 backup restore

我正在使用tarsnap进行备份,并且运行良好。但是,为了测试备份,我想恢复它但不覆盖文件的当前版本。因此,将备份提取到与备份源文件夹分开的文件夹中是有意义的。tarsnap可以做到这一点吗?

arv*_*idj 5

从联机帮助页:

 -C directory
         (c and x modes only) In c mode, this changes the directory before adding the following files.  In x mode, change directories after opening the archive but before
         extracting entries from the archive.
Run Code Online (Sandbox Code Playgroud)

因此,tarsnap -f imagename -C output-dir将提取imagenameoutput-dir.