docs: More help/usage
This commit is contained in:
parent
c115babaca
commit
3c52c40250
19
README.md
19
README.md
@ -9,7 +9,24 @@ The included workflow that actually performs the backup can be manually run thro
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ /bin/bash scripts/backup.sh -r <repository> -b <branch> -d </path/to/data> [-n <commit limit>] [-v] [-x]
|
$ scripts/backup.sh -h
|
||||||
|
Usage: scripts/backup.sh [-r <repository url>] [-b <branch>] [-d <path dest>] [-n <num>] [-v] [-x] [-i] [-h]
|
||||||
|
|
||||||
|
Ex: scripts/backup.sh \
|
||||||
|
-r https://github.com/descartes-underwriting/devops-technical-test-data.git \
|
||||||
|
-b main \
|
||||||
|
-d /home/mycroft/dev/private-backup/data
|
||||||
|
|
||||||
|
Available flags:
|
||||||
|
-r <repository url> - set remote repository url (suffixed by .git) to backup
|
||||||
|
-b <branch> - branch to backup
|
||||||
|
-d </path/to/path> - where to backup; relative or absolute
|
||||||
|
-n <num> - number of commit to backup (default: unlimited)
|
||||||
|
-i - ignore tracking information - to restart from scratch
|
||||||
|
-v - verbose mode
|
||||||
|
-x - debug mode
|
||||||
|
-h - this help
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Ex:
|
Ex:
|
||||||
|
18
scripts/backup.sh
Normal file → Executable file
18
scripts/backup.sh
Normal file → Executable file
@ -45,8 +45,22 @@ do
|
|||||||
set -x
|
set -x
|
||||||
;;
|
;;
|
||||||
h)
|
h)
|
||||||
echo "Usage: $0 [-r <repository url>] [-b <branch>] [-d <absolute path dest>] [-n <num>] [-v] [-x] [-h]"
|
echo "Usage: $0 [-r <repository url>] [-b <branch>] [-d <path dest>] [-n <num>] [-v] [-x] [-i] [-h]"
|
||||||
echo "Ex: $0 -r $REPOSITORY -b $BRANCH -d $DATA_DIR"
|
echo
|
||||||
|
echo "Ex: $0 \\"
|
||||||
|
echo " -r $REPOSITORY \\"
|
||||||
|
echo " -b $BRANCH \\"
|
||||||
|
echo " -d $DATA_DIR"
|
||||||
|
echo
|
||||||
|
echo "Available flags:"
|
||||||
|
echo " -r <repository url> - set remote repository url (suffixed by .git) to backup"
|
||||||
|
echo " -b <branch> - branch to backup"
|
||||||
|
echo " -d </path/to/path> - where to backup; relative or absolute"
|
||||||
|
echo " -n <num> - number of commit to backup (default: unlimited)"
|
||||||
|
echo " -i - ignore tracking information - to restart from scratch"
|
||||||
|
echo " -v - verbose mode"
|
||||||
|
echo " -x - debug mode"
|
||||||
|
echo " -h - this help"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
?)
|
?)
|
||||||
|
Loading…
Reference in New Issue
Block a user