#!/bin/bash
rsync -avuz /var/www/example.com/ root@192.168.200.10:/var/www/example.com/
a - archive mode
v - increase verbose
u - skip files that are newer on the receiver
z - compress file data during the transfer
Edit crontab:
run crontab -e and add:
*/5 * * * * /home/ramesh/backup.sh
No comments:
Post a Comment