但是,要做一个完全备份而不是增量式的。
我正在脚本文件中使用以下rsync。
rsync -razv [email protected]:repos /home/backup_sys_user/repos_backup
我想创build下面的结构:
/repos_backup/10.10.2010 /11.10.2010 /12.10.2010
有没有反正rsync可以做到这一点。 我知道如果可以使用--backup-dir=DIR创build目录,但是这只是用于增量。 我想做一个完整的备份。
非常感谢您的任何build议,
DATE=`date +%m.%d.%Y` rsync -razv [email protected]:repos /home/backup_sys_user/repos_backup/$DATE
但是,您可能需要查看使用–link-dest将使用硬链接创build备份,然后,删除较旧的备份仍然会留下完整的副本,但是只会占用更改文件的磁盘空间。
karmawhore有它通常是正确的,但不是手动使用“–link-dest”,你可能想检查出rsnapshot:
此外,对于大量的文件,我build议使用3.x版本的rsync版本,因为这个关键的改进:
- A new incremental-recursion algorithm is now used when rsync is talking to another 3.x version. This starts the transfer going more quickly (before all the files have been found), and requires much less memory. See the --recursive option in the manpage for some restrictions.