How to backup your Amahi
Posted: Sat Jul 24, 2010 2:05 pm
I'd like to document & create an easy to run procedure to backup Amahi, in case I need to reinstall it later on.
For example, if/when my / partitions becomes corrupted or something.
I'd like to get back the exact server I have now, which means:
- My Amahi settings: everything I have in my Amahi dashboard. For example: shares, advanced settings enabled?, static IPs, aliases, storage pool configuration, etc.
- My installed Amahi apps, including their data (most of the time, their database) & config files.
- My custom web-apps: I created a couple of web-apps using Apps > Webapps > Create. I don't want to loose those!
- My installed software: apps I installed using yum.
To achieve this, I'd need to back up:
1. Directories:
2. Lists:
- Installed RPMs
- Installed amahi apps
3. Complete MySQL dump
4. All config files from installed RPMs. Maybe we can identify if they were modified or not, and only backup if they were?
5. The iso I used to install, in case it's not available anymore when I need to reinstall.
Procedure to restore:
- Re-install Amahi, using the same install code (profile)
- Restore /var/hda/platform/html/config/
- Re-install all amahi apps (can we do this from the command line?)
- Restore /var/hda/web-apps/
- Re-install all RPMs; (in two passes, since the first try could install repos that are needed to find some RPMs.)
if any RPMs are not found, warn the user, and tell him he should manually download and install them.
- Restore RPMs config files
- Restore /etc/
- mount -a
- Restore MySQL database
- hdactl-hup (I guess it does stuff relative to the MySQL data we just inserted... right cpg?)
- (TODO) Need to identify ruby code that needs to be called here; for example, the code that generates smb.conf and restart the smb service, and the code that generates greyhole.conf, and restarts the greyhole service.
Maybe it would be easier to make a fake HTTP session on the dashboard, during which we'd change some values to trigger the above code (change a share path, change options in the storage pool page, change a static IP, etc.
- Reboot ?
Anything I'm forgetting ?
For example, if/when my / partitions becomes corrupted or something.
I'd like to get back the exact server I have now, which means:
- My Amahi settings: everything I have in my Amahi dashboard. For example: shares, advanced settings enabled?, static IPs, aliases, storage pool configuration, etc.
- My installed Amahi apps, including their data (most of the time, their database) & config files.
- My custom web-apps: I created a couple of web-apps using Apps > Webapps > Create. I don't want to loose those!
- My installed software: apps I installed using yum.
To achieve this, I'd need to back up:
1. Directories:
Code: Select all
/etc/
/var/hda/web-apps/
/var/hda/platform/html/config/
- Installed RPMs
- Installed amahi apps
3. Complete MySQL dump
4. All config files from installed RPMs. Maybe we can identify if they were modified or not, and only backup if they were?
5. The iso I used to install, in case it's not available anymore when I need to reinstall.
Procedure to restore:
- Re-install Amahi, using the same install code (profile)
- Restore /var/hda/platform/html/config/
- Re-install all amahi apps (can we do this from the command line?)
- Restore /var/hda/web-apps/
- Re-install all RPMs; (in two passes, since the first try could install repos that are needed to find some RPMs.)
if any RPMs are not found, warn the user, and tell him he should manually download and install them.
- Restore RPMs config files
- Restore /etc/
- mount -a
- Restore MySQL database
- hdactl-hup (I guess it does stuff relative to the MySQL data we just inserted... right cpg?)
- (TODO) Need to identify ruby code that needs to be called here; for example, the code that generates smb.conf and restart the smb service, and the code that generates greyhole.conf, and restarts the greyhole service.
Maybe it would be easier to make a fake HTTP session on the dashboard, during which we'd change some values to trigger the above code (change a share path, change options in the storage pool page, change a static IP, etc.
- Reboot ?
Anything I'm forgetting ?