在rdiff backup命令中用于目录的内容

时间:2014-05-07 23:05:04

标签: linux ubuntu command backup rdiff-backup

我需要删除备份以在我的服务器上打开空间。虽然我不知道我应该在命令中删除它们rdiff-backup --remove-older-than 20B host.net::/remote-dir。到目前为止,我的目录在备份服务器上看起来像这样。

\home\admin\server1\  

然后我在里面有一个名为rdiff-backup-data的文件夹。这是其他文件夹的补充,但这是我应该将命令指向的那个吗?

非常感谢!

1 个答案:

答案 0 :(得分:0)

根据rdiff-backup man page,您使用目标目录以及--remove-older-than选项。目标目录是包含 rdiff-backup-data目录的目录。

除目录问题外,--remove-older-than选项的时间规范也不正确。引用文档,

          time_spec can be either an absolute time, like "2002-01-04",  or
          a  time  interval.   The time interval is an integer followed by
          the character s, m, h, D, W, M, or Y, indicating  seconds,  min-
          utes,  hours,  days,  weeks, months, or years respectively, or a
          number of these concatenated.  For example, 32m  means  32  min-
          utes,  and 3W2D10h7s means 3 weeks, 2 days, 10 hours, and 7 sec-
          onds.  In this context, a month means 30 days,  a  year  is  365
          days, and a day is always 86400 seconds.

如果你刚刚运行一次,你可能会删除多个增量,在这种情况下你还需要--force选项。