Quick rsync to backup your home dir and mysql databases.
#!/bin/bash
#RUN the below script using "nohup - run a command immune to hangups, with output to a non-tty"
#admin@serversignature.com
IP=192.168.0.1
rsync -vrplogDtH --exclude=virtfs/ --progress -e ssh root@$IP:/home/ /home/
rsync -vrplogDtH --progress -e ssh root@$IP:/var/lib/mysql/ /var/lib/mysql/
#Backup one large DB
rsync -vrplogDtH --progress -e ssh root@$IP:/var/lib/mysql/server_support /var/lib/mysql/
#END
OPTIONS SUMMARY
Here is a short summary of the options available in rsync. Please refer to the detailed description below for a complete description.
-v, --verbose increase verbosity
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-L, --copy-links transform symlink into referent file/dir
-H, --hard-links preserve hard links
-p, --perms preserve permissions
-o, --owner preserve owner (super-user only)
-D same as --devices --specials
-t, --times preserve modification times
-n, --dry-run perform a trial run with no changes made
-e, --rsh=COMMAND specify the remote shell to use
Post a Comment