script to backup your Redmine database and files folder for Windows
Added by Alexandre Jobin about 14 years ago
hi everyone!
i would like to share with you a script that i use to backup my Redmine database and files folder. It's written in Powerscript for Windows and i can schedule a task to lunch the script. The script has been modified from the original made by James Coffman.
Heres the step that the script will do:
- backup the Redmine database with mysqldump.exe
- copy the files from the Redmine/Files folder
- zip everything in one file
- copy the zip file in the backup folder
- check backup files and delete the ones that is older than the number in $DaysToKeepBackups variable
theres no validations in this script and i dont have time to learn Powerscript to make it more solid. If someone wants to make modification to make it more robust, it would be very nice!
what i wanted to do:
- check if every tools needed are there
- if something break, stop everything and send an error code so the scheduled task will know that the task has not been executed properly
- etc...
alex
redmineBackup.ps1 (6.72 KB) redmineBackup.ps1 |