Most users will want to backup LAMS at some stage. If you are running a server with learners actively using LAMS, then you should be backing up LAMS regularly. Even if you are using LAMS on your personal laptop to develop learning designs before importing them into a shared server, you will want to backup LAMS when you do LAMS upgrade.
To make things easier, we have written Backup and Restore utilities that runs under Windows. This will allow you to backup LAMS if you are running a standard LAMS server, as set up by the installer.
When you upgrade LAMS using the Windows upgrader, it will try to do a backup and if it does then you can use the Restore utility to go back to your old version of LAMS should the upgrade failed.
However, if you are running Windows withMySQL on a different server then it is more complicated and the backup/restore process will need to be done manually. If this is your situation, please see Other Backup page.
Backing Up LAMS
First work out how much space the backup will need. All of the LAMS directory will be copied and the database will be dumped. Get the size of your LAMS folder(normally c:\lams) by selecting the folder in Explorer and doing File, Properties then find some somewhere with enough disk space for a complete copy of the LAMS directory plus the database backup.
Initially the database backup is less than 1MB big, but as you use LAMS it will need more space. You will need to try to guess how much space the backup will use based on how big it was last time the backup was done. The database backup will always get bigger - it won't get smaller!
If you are upgrading LAMS, the installer will prompt you to backup your LAMS installation. If at all possible backup LAMS as this will allow you to go back to your old version if something goes wrong. The backup will be placed on the same drive as your LAMS folder (normally the C:\ drive), so make sure there is enough space that drive.
Running your own backup
In between upgrades, you will probably want to run your own backup. Follow these steps.
- Find somewhere with enough space for your backup. It doesn't have to be on your C:\ drive - it can be anywhere on your computer.
- The LAMS folder contains a utility "LAMS Backup" (lams-backup.exe). This was added in LAMS 2.0.3. Run this program.
- You will be asked whether or not you want to shutdown LAMS. If you can shutdown LAMS then we can do a "cold backup", which is generally considered safer than a backup done with LAMS running (as no one can be changing anything while you are doing the backup). If it isn't possible to shutdown, the backup should work but there is a small chance that extra files will be backed or the database won't contain all the changes that a user is halfway through doing while the backup runs.
- The backup utility will suggest a name and a location for the backup directory. Change this to wherever you have enough disk space for the backup and change the name if you wish to something that makes sense to you. It will default to naming the backup based on the LAMS version and the current date and time.
The instructions below assume that LAMS is installed in c:\lams, the database name is lams2 and the backup directory is something like c:\lams-backup-200703030900.bak. You will need to replace these values with your own directory names.
Backing up Wildfire should also be part of your backup strategy. It contains the logs of chat activities within LAMS. Refer to this page for more details.
Restoring either from an upgrade or from a backup you have done by running the backup utility can be done via the Restore utility.
This restore utility will completely delete the current LAMS directory, so if there were any log files that you wanted to send to the support staff then do that before running the Restore.
- Shutdown LAMS. You must shutdown LAMS - you cannot do the restore with people using LAMS.
- The LAMS folder contains a utility "Restore previous LAMS version" (lams-restore.exe). This was added in LAMS 2.0.3. Run this program.
- If you didn't shutdown LAMS before running the Restore program, it will prompt you to shutdown LAMS.
- It will ask you for the directory that contains the backup. Select the directory and click "Restore LAMS". This will start the restore. There are a lot of files to copy, so it might take a while.
- Once it is finished, you can start up LAMS as usual.
Warning title May need to run the executable from the backup directory
We sometimes found that the running the lams-restore.exe from the c:\lams directory doesn't restore all the files or the database properly. If you run the restore and end up with an empty database or you try to run LAMS and get the error "Could not start LAMSv2 service: [SC] StartService FAILED 3: The system cannot find the path specified" then you have this problem.
It is very easy to fix. Copy lams-restore.exe to the backup directory (e.g. C:\lams-2.0.3-200706221144.bak) then run lams-restore.exe from the backup directory. We find this works every time!
We are working on a fix for this problem.