From 9f56e30c80ffffb9c87a295812f9406bbf59761b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 28 Feb 2022 22:11:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hb_server/apps/develop/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hb_server/apps/develop/tasks.py b/hb_server/apps/develop/tasks.py index 3a5ea27..5b7351f 100644 --- a/hb_server/apps/develop/tasks.py +++ b/hb_server/apps/develop/tasks.py @@ -12,7 +12,7 @@ def backup_database(): """ import datetime name = datetime.datetime.now().strftime('%Y%m%d%H%M%S') - command = '''pg_dump "user=postgres password=zcDsj2021 dbname=hberp" > /home/lighthouse/backup/hberp_{}.sql'''.format(name) + command = '''pg_dump "user=postgres password=zcDsj2021 dbname=hberp" > /home/lighthouse/backup/database/hberp_{}.sql'''.format(name) completed = subprocess.run(command, shell=True, capture_output=True, text=True) return completed