1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-17 00:07:45 +02:00

Gzip wal_archives

This commit is contained in:
Tim Möhlmann
2018-11-30 17:46:59 +02:00
parent 2cb27a9f32
commit 44dae7353c
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ if not os.listdir("/data"):
subprocess.call(["tar", "--same-owner", "-zpxf", base_backups[-1] + "/base.tar.gz" , "-C", "/data"])
if os.listdir("/backup/wal_archive"):
with open("/data/recovery.conf", "w") as rec:
rec.write("restore_command = 'cp /backup/wal_archive/%f %p'\n")
rec.write("restore_command = 'gunzip < /backup/wal_archive/%f > %p'\n")
rec.write("standby_mode = off\n")
os.system("chown postgres:postgres /data/recovery.conf")
#os.system("sudo -u postgres pg_ctl start -D /data -o '-h \"''\" '")