Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382
Rep:
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.
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".
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382
Original Poster
Rep:
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?
The above rsync's to the destination and delete's extra files (so it stays clean)
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.
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?
Depends on what you back up. Personally I back up content and key configuration files rather than doing whole system backups, that way if I have to restore on to different hardware or a different distro I can do so relatively easily.
There would be nothing to stop you taking a complete system backup if you so desired though.
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382
Original Poster
Rep:
Quote:
Originally Posted by TenTenths
Depends on what you back up. Personally I back up content and key configuration files rather than doing whole system backups, that way if I have to restore on to different hardware or a different distro I can do so relatively easily.
That's something for me to think about. This is a re-purposed server. If it dies, I would like to be able to restore to a new machine if I need to.
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.
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.
In addition to any internal backup "plugin/add-on" I'd do a mysqldump of the relevant Joomla database on a regular basis (daily? hourly? how often does it change?) and then back that up along with the whole of the Joomla install folder and any folders used for attachments.
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382
Original Poster
Rep:
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?
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.