File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
opensciencegrid/s3-backup Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,9 @@ Subcommands:
2323 backup Encrypts and backs up data to S3
2424 ls [path] Show contents of S3_DEST_DIR or 'path'
2525 ('/' shows the contents of the S3_BUCKET root)
26- mirror [--remove] Sync S3 source to S3 destination, replacing contents
27- --remove: Remove extraneous objects from target
26+ mirror Sync S3 source to S3 destination, replacing contents
27+ [--remove] Remove objects on dest that do not exist on source
28+ [--dry-run] Perform a mock mirror operation
2829 restore [datetime] Restore latest backup from S3 or backup corresponding to
2930 'datetime' (format YYYYMMDD-hhmm)
3031
@@ -135,6 +136,8 @@ mc_mirror() {
135136 # Parse optional args
136137 while [[ $# -gt 0 ]]; do
137138 case $1 in
139+ --dry-run)
140+ shift ; args+=(" --dry-run" ) ;;
138141 --remove)
139142 shift ; args+=(" --remove" ) ;;
140143 * )
@@ -169,8 +172,8 @@ mc_create_alias () {
169172# Capture the subcommand
170173case $# in
171174 0) subcommand=backup ;;
172- # allow 2 args, ls/restore can take an additional arg
173- [12 ]) subcommand=$1 ;;
175+ # allow 2-3 args, ls/restore can take 2, mirror 3
176+ [123 ]) subcommand=$1 ;;
174177 * ) usage ;;
175178esac
176179
You can’t perform that action at this time.
0 commit comments