Skip to content

Commit 07121bd

Browse files
committed
add backup frequency support for kopia backups
1 parent 13e93e8 commit 07121bd

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

hasadna_k8s/ceph/cli.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ def main():
1313
@main.command()
1414
@click.argument('namespace')
1515
@click.argument('pvc_name')
16-
def pvc_backup(namespace, pvc_name):
16+
@click.option('--with-weekly', is_flag=True)
17+
def pvc_backup(**kwargs):
1718
from .pvc_backup import main
18-
main(namespace, pvc_name)
19+
main(**kwargs)
1920

2021

2122
@main.command()
@@ -27,11 +28,13 @@ def maintenance(**kwargs):
2728

2829
@main.command()
2930
@click.option('--with-full-maintenance', is_flag=True)
30-
def pvc_backup_all(with_full_maintenance):
31+
@click.option('--with-weekly', is_flag=True)
32+
@click.option('--with-weekly-on-saturday', is_flag=True)
33+
def pvc_backup_all(with_full_maintenance, **kwargs):
3134
from .pvc_backup import main_all
3235
pvc_backup_failed = False
3336
try:
34-
main_all()
37+
main_all(**kwargs)
3538
except Exception as e:
3639
if with_full_maintenance:
3740
traceback.print_exc()

0 commit comments

Comments
 (0)