Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Restoring to Different Server

$
0
0
by BSNB Tech.  

EDIT: As is tradition, I managed to get the development server up and running literal seconds after posting this. I am going to leave it up in case anyone has any advice for better practices!

-----ORIGINAL-----

TL;DR at the bottom.

Hello,

I am head of tech at a small education business. While our LMS server is up and running, there are some mechanical changes that could be done to improve it (such as upgrading Moodle and spinning off the database). However, I am very nervous to attempt any of this without being able to quickly and quietly restore to a previous state when something inevitably goes awry.

I have all three suggested backups running by various programs and cron tasks (as well as a less-frequent AWS snapshot of the whole server) on a scheduled basis, meaning that, theoretically, I have everything I need to restore quickly. Using these, I have been trying to spin up a separate, dummy server in AWS that is an exact copy of the live LMS; I want to be able to test the more dangerous changes on a development server before operating on the live one. And here is where the dilemma lies.

Most of the moodle documentation on backup/restore focuses around dropping the backups onto the (formerly-)live moodle server. This does not quite work when a new server is in place with a different IP and what not. My question, then, is: What steps or best practices should I follow to exactly recreate my live LMS on a separate, testing server?

My current steps are (probably time to note this is a Debian instance):

  1. Spin up dummy server (some EC2 instance, in my case).
  2. Upload all three backups (code, data, and database) to the dummy server.
  3. Unpack each tarball/gzip.
  4. Copy the moodle code to webroot and recursively change ownership (apache) and permissions (755 or 644).
  5. Copy the moodledata to the dataroot and change ownership and permissions as above.
  6. Update config.php with the server's IP address and double-check dataroot location.
  7. Call mysql_secure_install to set root and root password.
  8. Unpack the database backup into the dummy's database.
  9. Add a moodle user with proper permissions to the database (as per initial set up). Match its username and password with that in config.php. Give it full management rights of the unpacked database.
  10. Within phpmyadmin, perform a search and replace of the absolute url of the live LMS and replace it with the dummy's public IPv4 (or domain, if one is attached).
  11. Access site?
These do not quite work as intended. The most recent time, I got a permission error. The time before that was a different error that I am failing to recall. I would really appreciate any advice or alternate steps anyone has as my ability as a web administrator is a lot of learning of on-the-fly.

Thank you in advance!

TL;DR: I am trying to create an exact copy of my live LMS (debian), based on the three suggested backups, on a different, dummy/development server. Any and all help would be greatly appreciated!

Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>