Skip to main content

Backup webserver to nas

I want to backup simpel.cc to my NAS. So far I found this code:

rsync -a -r --delete --exclude 'audio' --exclude 'temp' --exclude 'video' --exclude 'z_*' \
	-e "ssh -i ~/.ssh/id_nas_wwwsimpel_rsa" c.zelck@simpel.cc:/var/www/c.zelck/simpel.cc/ \
	/volume1/web/simpelcc-backup/ -v

-a
archive (all permissions and dates are kept)
-e "ssh -i ~/.ssh/id_simpel_rsa"
with ssh and use the key id_simpel_rsa
-r
recursive
-v
verbose
--delete
delete files that are not on webserver anymore
--exclude
exclude files and folders


Made an alias backupwww firing a backup script.