Compare commits

..

No commits in common. "e4ce5271eb06909e72bdefb626a4a4b7e32f9f3e" and "2ae7dc26357ff01aa59cfd5fd6c00c88a42ed6f2" have entirely different histories.

1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ def backup_database():
import datetime
name = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
command = 'echo "{}" | sudo -S -u postgres pg_dump "user={} password={} dbname={}" > {}/bak_{}.sql'.format(
command = 'echo "{}" | sudo -S pg_dump "user={} password={} dbname={}" > {}/bak_{}.sql'.format(
SD_PWD, DATABASES["default"]["USER"], DATABASES["default"]["PASSWORD"], DATABASES["default"]["NAME"], BACKUP_PATH + "/database", name
)
completed = subprocess.run(command, shell=True, capture_output=True, text=True)