Disaster recovery redux

dazed_and_confused

Joined: 2010-08-19
Posts: 32
Posted: Thu, 2011-03-10 00:04

I have a functional Gallery2 installation running on Ubuntu 10.04.2 LTS.
As a precautionary measure, I want to do a bare metal recovery to unlike hardware.

I have looked at the FAQ and the subject is touched upon, but I have yet to find a full list of everything you need to do a restore, all in one place.

I would like to re-install an Ubuntu LAMP server, then use specific backups from the original server to restore over the new server.

This is what I think will do it, and I'm working my way through this to verify it.
App directory and subfolders
Data directory and subfolders
mysql db backup (will a complete dump ala --all-databases work?)
apache configuration (how does virtual hosts affect which files are picked up?)
php configuration? (where is this held?)

Any help in specifying the exact files and data needed that will help reduce the amount of data targeted for backup will help a lot, I think.


Gallery version (not just "2"): 2.3.1
PHP version (e.g. 5.1.6): 5.3.2
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):2.2.14
Database (e.g. MySql 5.0.32): 5.1.41
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux): Ubuntu 10.04.2 LTS (Lucid)
Browser (e.g. Firefox 2.0): Firefox

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-03-10 00:34
 
dazed_and_confused

Joined: 2010-08-19
Posts: 32
Posted: Thu, 2011-03-10 13:39
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2011-03-10 13:43

G2 has a rather large FAQ as well as much greater documentation linked in the upper right corner of every page on this site.

.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
dazed_and_confused

Joined: 2010-08-19
Posts: 32
Posted: Thu, 2011-03-17 13:22

This seems to be working for me - I have successfully transferred from one server to two others in my environment (haven't renamed the target hosts yet, but that's next).
Is this sane or am I setting myself up for issues down the road? See anything that I can improve upon?

This is based on periodic backups of my webserver. I use Ubuntu 10.04 LTS.

I create a tar from the root account (which preserves permissions) and capture these directories:
/etc/apache2 /etc/javascript-common/javascript-common.conf /etc/php5 /etc/gallery2 /var/www /var/lib/gallery2 /usr/share/gallery2

I exclude these directories from backup:
/var/lib/gallery2/g2data/cache /var/lib/gallery2/g2data/locks

I dump the mysql db all in one file:
mysqldump --add-drop-table --all-databases -uID -pPW > dumpfile.sql

To recover from this to other/replacement hardware:

Install from Ubuntu minimal install of 10.04 LTS, select openssh server and lamp server

After initial boot up:

apt-get update
apt-get upgrade (to get latest updates)
apt-get install gallery2 (Install gallery2 so you have all the needed dependencies)

Stop apache and mySQL

Extract web server backup from root.

Restart mysql

Restore mysql dump
mysql -uID -pPW < dumpfile.sql

Restart apache

Run through gallery2 install/reconfigure (reuse existing tables)

EDIT: added another directory I missed.