Skip to content

Commit

Permalink
#38: added readme files for new utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mohit-s96 committed Jul 27, 2023
1 parent 64326c9 commit 1bd2b06
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
12 changes: 12 additions & 0 deletions lib/backup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Backup a Reso Cert API server
```bash
node index.js backup -u <server base url> -p <path to the directory where we want the reports backed up> -d -w
```

`-d` and`-w` are optional flags that specify whether to 'only backup DD/DA reports (`-d`)' or to 'only backup webAPI reports (`-w`)'. Omitting/Including both will back up everything.

### Example usage:

```bash
reso-certification-utils backup -u http://localhost -p ~/Downloads
```
12 changes: 12 additions & 0 deletions lib/restore-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,15 @@ The following directory structure is assumed:
+ providerUoiN-providerUsiN
```

## Restore from a server backup
```bash
reso-certification-utils restore -u <server base url> -p <path to the server backup directory> --restoreFromBackup
```

The `--restoreFromBackup` or `-r` flag tells the tool to restore from the backed-up server data rather than raw reports.

### Example usage:

```bash
reso-certification-utils restore -u http://localhost -p ~/Downloads/reso-server-backup/data_dictionary-1.7 -r
```
20 changes: 20 additions & 0 deletions lib/transform/transformations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Run a transformation on all reports of a given cert API server
```bash
node index.js transform -u <server base url> -p <path to the directory where we want the reports backed up> -r -b -e
```

The `-b` or `--backup` flag creates a backup of all the DD/DA reports from the given server before starting the transformation.

The `-p` or `--pathToBackup` option is required when using the backup flag.

The `-r` or `--rescore` flag is a transformation that adjusts the EMPTY_LIST/NULL_VALUE counts, rescores the report, and posts them back to the cert API server.

The `-e` or `--runEtl` flag is another transformation that takes in a DA report, converts it to raw form, and runs the ETL method on the report. This transformation will always be run last if more than one transformation is provided.

__Note:__ It is advisable to always create a backup before running any transformations.

### Example usage

```bash
node index.js transform -u http://localhost -r -e -b -p ~/Documents
```
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1bd2b06

Please sign in to comment.