Rsync backup deleted files

1. When used for recording and file synchronization, you can use the following commands to synchronize and keep the deleted files of the source file, which is convenient for later search.

rsync -avz --backup --backup-dir=/backup/mail_backup/date +%Y-%m-%d/date +%H:%M:%S --delete -e "ssh -p 622" [email protected]:/home /backup/mail_backup

rm -rf /backup/mail_backup//bin/date -d -60day +%Y-%m-%d

Guess you like

Origin blog.51cto.com/907832555/2561324
Recommended