Suggested backup solution for easy recovery
I set up a Debian 7 server for our intranet using a re-purposed server. After the OS, I installed Apache, MySQL, and PHP for the site. I then installed Joomla and started creating the site. About the time I was researching a backup solution for the server, the HD died and I lost everything. Not critical as the site wasn't online yet, but still irritating that I didn't install a backup solution right after I installed Joomla.
So I would like suggestions on a good backup solution that will allow me a quick restoration. I have set up backup solutions with Windows servers in the past using Symantec and Shadow Protect, but never a Linux backup. Should I look at images, or maybe a series of full backups? I have been looking at rsync, Bacula, and Back in Time, but not sure which solution would be the easiest to restore if I need to. Thanks in advance for any advice you can provide. |
Some say tar is the simplest tool and also the easiest one. Rsync reliable for local or network transfer.
|
First off, if you can do so then set up a hardware RAID, while RAID IS NOT A BACKUP it gives you a little mitigation against a single HD failure.
My personal preference is to take daily MySQL dumps of databases to a specific folder (unimaginatively I use /backup). Then use dirvish to create remote snapshots of at least /etc, /backup and /home at regular intervals, generally daily. For my personal sites I keep dervish vaults on separate servers, one of which is configured as a "warm" standby for my main sites and I also backup to a RasPi at home. At work I do something similar with the resulting backups being written to a rotation of LTO-4 tapes in an autochanger (hoping to go to LTO-6 soon). One of the joys of using dirvish is that the backups are differential so it's also easy to go back a few generations if necessary and the files are presented as a familiar folder "tree". |
Thanks to both of you for your reply. If I use Dirvish to take snapshots, how would I restore if I needed to do a complete restore? Would I need to reinstall Debian, install Dervish, and then restore the last image?
|
You could also do a "poor mans" incremental with rsync and cp's hard linking.
Code:
#!/bin/bash Then, it hard links the contents to a directory named for that day. Since hard links are just another pointer to the same info no extra space is used (except for pointer info) If the data is corrupted or written over (shredded) you'll have issue, but otherwise works really well. You can go back to whatever day and grab a file that's be deleted for example. It won't rotate them though, so it'll keep piling up. This link gives a good explanation. http://www.mikerubel.org/computers/rsync_snapshots/ |
Quote:
There would be nothing to stop you taking a complete system backup if you so desired though. |
Quote:
My biggest concern is to be able to restore Joomla. It uses Apache, MySQL, and PHP, all of which I can install via instructions, but don't have a working knowledge of. How would I back up Joomla to make sure that if I did need to restore it to a rebuilt machine, I could restore it and be back in service? If it was a typical program or a group of files, I would know how. But being a CMS, I'm not sure of how to approach it. I will use Akeeba Bacup within Joomla, but don't want to have to rely on it exclusively. Thanks again for everyone's help! |
Quote:
|
Thanks a lot for the help. It was the MySQL backup that I was concerned with. So I would do a backup on the /var/joomla folder with a separate MySQL backup. Upon restoration, I would restore var/joomla and then do a MySQL restore?
|
Quote:
You might find this interesting: http://centos.tips/mysql-backup/ This is the script I use on my personal web servers to backup MySQL databases and rsyncing them to a remote server. |
All times are GMT -5. The time now is 06:58 AM. |