# quick-restore

> quick-restore is a cli tool which speeds up the tedious task of restoring backups.

Latest version **0.6.0** (published 2023-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install quick-restore
pnpm add quick-restore
yarn add quick-restore
bun add quick-restore
```

Provides the command `quick-restore`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2023-01-02 |
| First published | 2017-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.3.0 |
| Dependencies | 4 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | patrik-lundqvist |
| Keywords | backup restore, mssql restore, restore |

## Links

- npm: https://www.npmjs.com/package/quick-restore
- Repository: https://github.com/Patrik-Lundqvist/quick-restore
- Homepage: https://github.com/Patrik-Lundqvist/quick-restore#readme
- Issues: https://github.com/Patrik-Lundqvist/quick-restore/issues
- npm.io page: https://npm.io/package/quick-restore

## Dependencies (4)

- [aws-sdk](https://npm.io/package/aws-sdk.md) 2.1283.0
- [tedious](https://npm.io/package/tedious.md) 15.1.2
- [fs-extra](https://npm.io/package/fs-extra.md) 11.1.0
- [@google-cloud/storage](https://npm.io/package/@google-cloud/storage.md) 6.8.0

## Recent versions

- 0.6.0 (latest) — 2023-01-02
- 0.5.0 — 2022-12-28
- 0.4.0 — 2020-10-24
- 0.3.0 — 2019-10-07
- 0.2.0 — 2019-10-05
- 0.1.0 — 2017-09-10

## README

# quick-restore

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

## Usage

### Install

```
npm install quick-restore -g
```

### Restore a [workspace](#setup-workspace)

```
quick-restore
```

### Restore a local file

```
quick-restore <filepath>
```

## Setup workspace

- Create config file at `<working-dir>/quick-restore/config.json`

Example S3:
```json
{
  "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:

```json
{
  "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



## Troubleshooting

### Connection refused
When using MSSQL, the TCP/IP connection must be enabled. See this link on how to enable it:

- https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-or-disable-a-server-network-protocol?view=sql-server-ver15

### Set file system permissions
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: 

- https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/configure-file-system-permissions-for-database-engine-access?view=sql-server-2017

---
_Source: https://npm.io/package/quick-restore · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
