Mobile app version of vmapp.org
Login or Join
Berryessa370

: Best Automatic Backup Solution Options? I have a VPS with WiredTree.com in which I have access to WHM. I'm looking for a good backup solution where I can do the following things Backups both

@Berryessa370

Posted in: #Backups #Cpanel #WebHosting

I have a VPS with WiredTree.com in which I have access to WHM.

I'm looking for a good backup solution where I can do the following things


Backups both the Database and Files
Allow me access to the backups so that I can restore them on another server to ensure that backups are actually successful.


Any good options out there I should look at?

Thanks for any tips.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Berryessa370

1 Comments

Sorted by latest first Latest Oldest Best

 

@Correia994

Backups should always be on another server.

You can use rsync for your files, and mysqldump your for mysql databases.

I run a backup via cron, just using tar, mysqldump and SSHFS. This is a very simple solution, but works for me. Here my code (all in the root crontab).

MAILTO=crontab@website.com
#Mysql daily
30 4 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30 * * /usr/bin/mysqldump --user=root --password=passwd --opt --all-databases | gzip -2 > /root/backups/even/all.gz
30 4 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 * * /usr/bin/mysqldump --user=root --password=passwd --opt --all-databases | gzip -2 > /root/backups/odd/all.gz
#Files Daily
0 2 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30 * * tar cf /root/backups/even/etc.tar /etc/ /var/spool/cron/ /usr/local/sim
0 2 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 * * tar cf /root/backups/odd/etc.tar /etc/ /var/spool/cron/ /usr/local/sim
15 2 2,4,6,8,10,12,14,16,18,20,22,24,26,28,30 * * tar cf /root/backups/even/home.tar /home/
15 2 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 * * tar cf /root/backups/odd/home.tar /home/

# Weekly
0 6 7,21 * * rm -f /root/backups/week/* && cp /root/backups/odd/* /root/backups/week/
0 6 14,28 * * rm -f /root/backups/week/* && cp /root/backups/even/* /root/backups/week/

0 1 * * * unmount /root/backups
1 0 * * * /usr/bin/sshfs -o idmap=user -p 22 backups@server.com:/home/backups /root/backups > /dev/null

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme