Synchronize Files With rsync
Automatic Syncing With SSH Keys
#!/usr/bin/env bash
rsync -az –delete /home/kevin/source/ server.example.com:/home/kevin/destination
Automatic Syncing With SSH Keys
#!/usr/bin/env bash
rsync -az –delete /home/kevin/source/ server.example.com:/home/kevin/destination
Copy/Sync a File on a Local Computer
[root@tecmint]# rsync -zvh backup.tar /tmp/backups/
Copy/Sync a Directory on Local Computer
[root@tecmint]# rsync -avzh /root/rpmpkgs /tmp/backups/
…you can not backup and use –remove-older-than in the same command. You must execute these commands separately. You will receive an error if you attempt to do so.