From 00fdfb6298b78536fb7ff155f9ad88500d01e493 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Sun, 28 May 2023 14:16:37 +0700 Subject: [PATCH] add time in backup name --- vestasync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vestasync.py b/vestasync.py index dfb375a..80ce044 100755 --- a/vestasync.py +++ b/vestasync.py @@ -202,7 +202,7 @@ def git_clone(c): c.run(f'git clone {args.vestasync_gitea_protocol}://{gitea_user}:{args.gitea_token}@{args.vestasync_gitea_host}:{args.vestasync_gitea_port}/{gitea_user}/{args.source_hostname}.git /mnt/data/{args.source_hostname}_etc') def copy_etc(c): - current_date = datetime.datetime.now().strftime("%Y-%m-%d") + current_date = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") archive_name = f"backup_{current_date}.tar.gz" print(f"Remove old .git...") c.run(f"rm -rf /mnt/data/etc/.git")