Skip to content

Commit c1e3c7f

Browse files
committed
enh: be more verbose
1 parent c1e664d commit c1e3c7f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

dcor_control/cli/backup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@click.command()
14-
@click.option('--key-id', default="8FD98B2183B2C228",
14+
@click.option('--key-id', default="2B4B066FFE3D288E",
1515
help='The public gpg Key ID')
1616
@click.option('--skip-s3', is_flag=True,
1717
help='Do not upload the instance backup to S3')
@@ -25,15 +25,19 @@ def encrypted_instance_backup(key_id, skip_s3=False):
2525
to the S3 object storage to the `{dcor_object_store.bucket_name}-backup`
2626
bucket if `--skip-s3` is not specified.
2727
28+
To get a list of available signatures on your system, run
29+
`gpg --list-signatures`.
2830
You can import and export keys using `gpg --import filename.key`
2931
and `gpg --export KEYID > filename.key`.
3032
"""
3133
now = time.strftime("%Y-%m-%d_%H-%M-%S")
3234

3335
# Get database backup
36+
click.secho("Creating database backup")
3437
db_path = db_backup()
3538

3639
# Create a tar.bz2 file that contains the contents of /data and `dp_path`.
40+
click.secho("Creating instance backup")
3741
storage_path = pathlib.Path(get_ckan_config_option("ckan.storage_path"))
3842
droot = pathlib.Path("/backups/instance/")
3943
droot.mkdir(parents=True, exist_ok=True)
@@ -43,14 +47,14 @@ def encrypted_instance_backup(key_id, skip_s3=False):
4347
z.add(storage_path)
4448

4549
# create encrypted version
50+
click.secho("Encrypting instance backup")
4651
eroot = pathlib.Path("/backups/instance-encrypted/")
4752
eroot.mkdir(parents=True, exist_ok=True)
4853
eout = eroot / (dpath.name + ".gpg")
4954
gpg_encrypt(path_in=dpath, path_out=eout, key_id=key_id)
50-
click.secho("Created {}".format(eout), bold=True)
55+
click.secho(f"Created {eout}", bold=True)
5156

5257
click.secho("Cleaning up...")
53-
5458
delete_old_backups(
5559
backup_root=droot,
5660
latest_backup=dpath,

0 commit comments

Comments
 (0)