Howto Backup your Bitnami Instance to a Remote Site for Free

September 16, 2010

Howto Backup your Bitnami Instance to a Remote Site for Free
What you’ll need
1. Install dropbox to c:\My Dropbox
2. The names of the services bitnami uses (from command line type net start to get list of services)
3. A new local user in the administrator group that will just be used to run your backup tasks
4. Robocopy.exe (place this in c:\windows.. what is robocopy?)
Here we go
1. Create new folders called C:\My Dropbox\jobs and C:\My Dropbox\BitNami WAMPStack
2. In this folder create file wampstack_backup.bat (or whatever you want to call your backup batch file)
3. File should contain:

  • the commands to stop the bitnami services
  • robocopy mirror the installation directory to dropbox
  • then commands to start the bitnami services again

Example (to back up a wampstack):

REM wampstack_backup.bat
REM This file backs up your bitnami WAMPStack instance
REM -----
REM NOW STOPPING the bitnami services
REM -----
NET STOP wampstackApache
NET STOP wampstackMySQL
REM -----
REM NOW MIRRORING your bitnami install directory to your dropbox
robocopy "C:\Program Files\BitNami WAMPStack" "C:\My Dropbox\BitNami WAMPStack" /MIR /Z
REM -----
REM NOW STARTING the bitnami services
NET START wampstackMySQL
NET START wampstackApache

4.  Double click the .bat in windows explorer and make sure it works **please note the first execution of this task will take a little while to complete =)

5. Now create a windows scheduled task to run C:\My Dropbox\jobs\wampstack_backup.bat with your backup user executing it

6. Additionally create another scheduled task to run every hour with just these two lines (in case for some reason the original backup file fails to start the services)

NET START wampstackMySQL
NET START wampstackApache