Skip to content

chrismckelt/DatabaseMinder

Repository files navigation

databaseminder MyGet Build Status

DatabaseMinder -- requests welcome --> just raise an issue

Backup and zip or restore a MS SQL database library with command line runner

Command line runner NOT included in nuget package

see LINQPAD reference for use (down below)

if you would like a separate NUGET package let me know & Ill make it

This utility performs actions such as

  1. database backup and zip
  2. database restore

image

BACKUP with reference from nuget

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);

Restore a database from a folder (should contain at least 1 .bak file)

DatabaseMinder.RestoreDatabase.RestoreDatabaseFromFolder(new Server(), "exampleDB_Name", @"c:\path_to_backup","@c:\path_to_save_mdf_and_ldf");

PRs/Issues/Comments welcome!

About

Backup and zip or restore a MS SQL database library with command line runner.

Resources

License

Stars

Watchers

Forks

Packages

No packages published