Backup and zip or restore a MS SQL database library with command line runner
if you would like a separate NUGET package let me know & Ill make it
This utility performs actions such as
- database backup and zip
- database restore
var args = new DatabaseMinder.CommandArgs();
args.DatabaseName = "DatabaseMinder";
args.Backup = true;
args.Folder = @"c:\temp";
args.PromptsEnabled = false;
args.CompressionEnabled = true;
args.ZipBackup = true;
DatabaseMinder.Handler.HandleCommand(args);
DatabaseMinder.RestoreDatabase.RestoreDatabaseFromFolder(new Server(), "exampleDB_Name", @"c:\path_to_backup","@c:\path_to_save_mdf_and_ldf");