feat(ls): default to /var/lib/docker/volumes/ if no path is given #37
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ebcb0d42c5
commit
14b55bbc79
@ -157,7 +157,7 @@ Show all files inside the latest snapshot (can be very verbose):
|
|||||||
|
|
||||||
Show specific files inside a selected snapshot:
|
Show specific files inside a selected snapshot:
|
||||||
|
|
||||||
`abra app run <backupbot_name> app -- backup ls --snapshot <snapshot_id> --path /var/lib/docker/volumes/`
|
`abra app run <backupbot_name> app -- backup ls --snapshot <snapshot_id> /var/lib/docker/volumes/`
|
||||||
|
|
||||||
Download files from a snapshot:
|
Download files from a snapshot:
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ def snapshots():
|
|||||||
@cli.command()
|
@cli.command()
|
||||||
@click.option('snapshot', '--snapshot', '-s', envvar='SNAPSHOT', default='latest')
|
@click.option('snapshot', '--snapshot', '-s', envvar='SNAPSHOT', default='latest')
|
||||||
@click.option('show_all', '--all', '-a', envvar='SHOW_ALL', is_flag=True)
|
@click.option('show_all', '--all', '-a', envvar='SHOW_ALL', is_flag=True)
|
||||||
@click.argument('path', required=False, default='/')
|
@click.argument('path', required=False, default='/var/lib/docker/volumes/')
|
||||||
def ls(snapshot, show_all, path):
|
def ls(snapshot, show_all, path):
|
||||||
if snapshot == 'latest':
|
if snapshot == 'latest':
|
||||||
latest_snapshot = get_snapshots('latest')
|
latest_snapshot = get_snapshots('latest')
|
||||||
@ -424,7 +424,7 @@ def ls(snapshot, show_all, path):
|
|||||||
logger.error(f"There is no latest snapshot for {SERVICE}")
|
logger.error(f"There is no latest snapshot for {SERVICE}")
|
||||||
exit(1)
|
exit(1)
|
||||||
snapshot = latest_snapshot[0]['short_id']
|
snapshot = latest_snapshot[0]['short_id']
|
||||||
if path != '/' and os.environ.get('INCLUDE_PATH'):
|
if os.environ.get('INCLUDE_PATH'):
|
||||||
path = os.environ.get('INCLUDE_PATH')
|
path = os.environ.get('INCLUDE_PATH')
|
||||||
if show_all:
|
if show_all:
|
||||||
path = None
|
path = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user