Created
September 5, 2012 12:47
-
-
Save dotnetchris/3636052 to your computer and use it in GitHub Desktop.
Simple ravendb backup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dest = "F:\Backup\Runs\backup-"+(Get-Date).ToString("yyyy-MM-dd HHmm") | |
.\Raven.Backup.exe --url=http://localhost/ --dest=$dest | |
& 'C:\Program Files\7-Zip\7z.exe' a $dest $dest | |
Remove-Item -Recurse $dest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple ravendb backup script meant for running daily or hourly backups, create this as a backup.ps1 file and you can schedule using the built in windows scheduler, make sure to set the task up in scheduler to run as administrator with elevated rights properly.
This will then 7zip the backup results (generally a 5-10:1 compression ratio easily) and then removes the original files. If you want the original files just delete the remove-item call.