Jump to content

Automated backup


Recommended Posts

Hi, I wrote this .bat script to backup my game servers and mySQL databases to my secondary hard drive, Thought i would release it :)

It uses 7zip command line program.


Set FileDate=%date:/=%
7za a -tzip "D:\Backup Files\UserFilesBackup\GameBackup_%FileDate%.zip" "C:\UserFiles\*"

echo Running dump... 
"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqldump" -u(username) -p(password) --all-databases --result-file="D:\Backup Files\MySQL Backup\backup.sql"
echo Done!


I made it backup all of the GameServers and mySQL databases as I provide free mySQL databases for customers.

Here is a link to a package that includes the .bat and the 7z exe :)




I just set it as an automated task to run at 12:00 every night :)


I don't know if you will find it useful, but I thought I would release anyway!


Thanks for looking :)

Link to comment
Share on other sites

just a tip, instead of zipping the files (can be a long process) use robocopy to make mirrored backups


Yeh, I did that before. I decided to compress it all into a .zip is so that I can keep a good archive for a few months, and keep down on the disk usage :p

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use