I have been devising a way to automate the encrypted backup of my windows server to Amazon web services (S3 cloud). This is very inexpensive and allows a wide geographic secured backup option.This basic idea would likely work on various other platforms as well. I combined a freeware I found at www.dragondisk.com and previous backup scripts from the wiki. I extracted the command line tools to a directory I named C:\Dragon. I then wrote the following script in a text file using notepad and then saved it as a command file (filename.cmd) . You have to set up a web services account on Amazon, make a bucket you can name anything you desire, and add a folder named xampp to your bucket. You can then use windows scheduler to schedule running your command file at any schedule you desire when you are not using your server, since it shuts down services to run. It takes a long time to run the first time, but after that just backs up changed files.
net stop “mysql”
net stop “apache2.2”
SET DGTOOLS_ACCESS_KEY=myaccesskey you get these keys from the secuity set up area on amazon
SET DGTOOLS_SECRET_KEY=mysecretkey web services after your account is active
SET DGTOOLS_ENCRYPTION_PASSWORD=mypassword
SET DGTOOLS_DECRYPTION_PASSWORD_0=mypassword make up good strong passwords
SET DGTOOLS_DECRYPTION_PASSWORD_1=myoldpassword
cd C:\Dragon
start /wait dgsync.exe -z -e aes-256-cbc “C:/xampp/” “s3://mybucketname/xampp/”
net start “apache2.2”
net start “mysql”
The restore command line is the reverse of above and should allow you to restore to any windows machine you desire if your server crashes.
dgsync.exe “s3://mybucketname/xampp/” “C:/xampp/”
I have only used this a few times after some basic test runs, but without apparent problems. Any input or critique would be welcome, but I think it could be a reasonable option for a common concern.
The wiki rules seem to involve copyrights. I’m not sure I can claim copyright for just showing others how to use someone elses freeware offered through the amazon site, by combining it with stuff already in the wiki. I am flattered however that you think it may be an idea worth posting. Maybe just a link to this forum would work.
The FDL license (which is used on the OpenEMR wiki) by default assigns copyright to the contributor (same as wikipedia). As long as you’re not copy/pasting your entire instruction set from other copyrighted material, it is ok. If you’re concerned, just let us know where you are taking the instruction set from, and can let you know if ok. If it seems ok, but your still concerned at that point, I’d be comfortable placing it on the wiki instead. It’s much better to compile instructions like this on the wiki rather than the sourceforge forums.
The above instructions came from combining instructions on the faq area at the above dragondisk link, the command line instructions for backup in the wiki, and some basic dos commands such as having the command wait to complete the backup before restarting apache. I guess it also uses other peoples work as well when it uses openSSL to give 256 encryption before transfer to the cloud. If you want to place the instructions on the wiki, I am fine with that. You might look at all the other available linux options as well. I still haven’t gotten the hang of linux. It seems from the web site that as long as you are not incorporating it into a product for sale, that it is free to use. You have to pay for the amazon web services, but so far for me that has been like 3 dollars a month. It also seems like there are other options available besides amazon, but I was already using amazon to backup all our old scanned paper charts .
Please feel free to modify it as needed. Do not worry about copyrighting issues on documentation. As long as you are not copy/pasting complete instruction sets from a another source, you are fine. Again, if you ever have concerns, though, just let me know what modifications you want to make on the wiki, and I can do it.
One little hint to make this idea work smoothly. The computer you use as your server should not have a power setting set to allow it to sleep when not in use. If the computer is asleep, the microsoft scheduler will not run.
To re-hash this old thread, is anyone using this backup proceedure successfully? Are there other backup servers that work with this type of automation? I am looking to automate my backup process and this seems like a good option for me. Thanks so much!