Skip to content

MS SQL Server command line database restore utility

License

Notifications You must be signed in to change notification settings

iphousehq/sql-restore

Repository files navigation

SQL Restore Utility

A command line utility to restore each .bak file present in a directory to a MS SQL Server. Existing databases are dropped if they already exist.

Usage:

sqlrest.exe restore [server] --src [source] --mdfPath [mdf] --ldfPath [ldf]
  • server The host name of the SQL server. Uses trusted authentication
  • source The source directory where the backup files are located
  • mdf The destination directory to restore the data (.mdf) files to
  • ldf The destination directory to restore the log (.ldf) files to

Todo:

  • Add support for non-trusted connections
  • Add options for file de-duplication checks (via timestamp, size). Currently, the most recent (and largest file) is chosen if duplicates exist.
  • Add option to not overwrite existing databases

Download:

Checkout the latest releases.

License

This project is licensed under the terms of the MIT license.

By submitting a pull request for this project, you agree to license your contribution under the MIT license to this project.

About

MS SQL Server command line database restore utility

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages