Posts Tagged ‘cpanel’
CRB - Cpanel Rsync Backup
Again, a long time without updating my blog, but i am back with a new script.
Last week, i was helping a friend with his server. As his main focus is web design, he asked me to help with some admin tasks, more exactly, with CPBackup and remote backups.
The issue was that CPBackup was taking 14 hours to complete so, as he run it daily, his server was more than 50% of the time doing backups
I created a simple script, now called CRB - Cpanel Rsync Backup. This scripts does remote backups of your Cpanel server using rsync.
This means that the first time will take some hours to finish, but the next backups will be much faster as it only copies the changed files since last run. Considering that you run it daily, you will probably have very few files to copy.
This way you can save time, bandwidth, CPU and even money always having a full backup of your files on a safety place.
Installation
Please note, this script is still beta. Use at your own risk!
Installation is pretty simple. Just download the install script and run it:
wget http://fernandomarcelo.com/crb/install.sh
sh install.sh
It is installed at /usr/local/crb. The first step is to edit file /usr/local/crb/crb.conf with your conf. The file has some comments which should make it simple, but in case you have questions, feel free to ask on comments.
After that, you can run the script with:
sh /usr/local/crb/crb.sh
Or, if you prefer to run it daily, add to cron.
Note: you must set password less login in order to have it running properly via cron.
Uninstall
Just remove folder /usr/local/crb from your server and, if necessary, remove cron job too.
Development
I still want to add more features for this script, making it more flexible and reducing cpu usage . You can follow up the development at the repository page: http://jira.consultorpc.com:766/browse/GPL/crb/trunk
Thanks for Daniel from ConsultorPC for allowing me to use the SVN repository.
How It Works?
No time to write this at the moment, but i will try to write soon