quick-restore is a cli tool which speeds up the tedious task of restoring backups.
Currently supports:
Sources:
- Local files
- S3
- Google Cloud Storage
Targets:
- MSSQL
npm install quick-restore -g
Restore a workspace
quick-restore
quick-restore <filepath>
- Create config file at
<working-dir>/quick-restore/config.json
Example S3:
{
"source": {
"client": "s3",
"connection": {
"secretAccessKey": "1234",
"accessKeyId": "1234",
"bucket": "my-bucket"
},
"prefix": "sqlbackup/"
},
"target": {
"client": "mssql",
"connection": {
"server": "127.0.0.1",
"username": "sa",
"password": "1234",
"database": "northwind"
},
"script": "./scrub.sql"
}
}
Example GCS:
{
"source": {
"client": "gcs",
"connection": {
"bucket": "my-bucket",
"keyFilePath": "/path/to/keyFile.json"
},
"prefix": "sqlbackup/"
},
"target": {
"client": "mssql",
"connection": {
"server": "127.0.0.1",
"username": "sa",
"password": "1234",
"database": "northwind"
},
"script": "./scrub.sql"
}
}
Setup and download your project's key file by following the instructions here: https://cloud.google.com/docs/authentication/getting-started
When using MSSQL, the TCP/IP connection must be enabled. See this link on how to enable it:
The restoring process might be failing due to insufficient file system permissions for the database engine. Permissons must be granted to the folder where the database file is downloaded and read from. See this link on how to resolve it: