0

I currently manage a website for my company - entirely internal, only employees can view.

This website is very important for the company's workflow throughout the day, and database information for pages can change drastically from one day to the next. I am trying to create regular backups to a remote server that will run an exact clone of the website so that in the event that something crashes, we can operate from the clone until the site is back up.

Unfortunately, all I've found so far in terms of backups are plugins or SSH scripts that backup the wordpress site into a .tar.gz, or a .zip, etc - none of them are a true clone. I need to be able to schedule a weekly backup that does a total clone of the website onto another server - database is most important in this case, however the theme is also very important.

My questions are:

  1. Does such a plugin or script even exist? I've done a lot of searching and have found none.
  2. If it does exist, what are any drawbacks to having a backup system like this? Is it significantly more likely to fail the backup?
2
  • What about a script on the backup to unpack and move the ZIPPED files? It's likely your theme files do not change often and the DB is your primary concern. Say it gets an hourly push to your backup server and the theme a weekly push.
    – jdm2112
    Commented Apr 18, 2017 at 19:39
  • That could work, but I do not have the SSH experience to be able to code that. What I know relating to SSH is only what I have looked at in terms of this particular project. Commented Apr 19, 2017 at 21:52

1 Answer 1

1

You should maybe consider if you are approaching the exercise the "wrong way around" :)

Kudos to you for thinking about backups, but I urge you to consider that if you had the site under version control, you could track every change that was made, have it automatically deployed to a staging server, and manually deployed to the live server only when everything is perfect.

At any time you could back-track to the last working revision.

If you do want to follow the backup route, then running your own server would allow you to rysnc snapshop the files, and dump the database nightly. Or if you are less equipped, there are certainly backup plugins... but nothing beats the manual approach! (imho) :)

3
  • My primary concern is not so much in the changes that people may make to the pages - I've structured the theme in such a way that a situation like that happening could very rarely happen unless someone has access to the raw PHP files. The biggest concern here is if the server crashes, we want to have a backup server so that we can still operate as a company. Commented Apr 19, 2017 at 21:55
  • Hi Trenton, I understand, and still think the "versioning" approach would provide the best answer. Ultimately you could deploy from the repository (I urge you to check out the likes of beanstalkapp.com to make it easier) automatically to a staging server, and two production servers. If a server goes down you could simply switch to another box... even that can be automated with some kind of DNS monitoring and switch-over routines. You'd also have to sync databases, but that can be easily achieved using cron and rysnc, same goes for wp-content Commented Apr 20, 2017 at 5:59
  • I think this would be a great solution in many other situations, but for the sake of ease in my case, it just doesn't quite do the job. I appreciate your help, though. Commented May 2, 2017 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.