mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-01 10:37:49 +00:00
Automatic restore of backups when /data is empty
This commit is contained in:
@@ -4,7 +4,7 @@ dest="/backup/base-$(date +%F-%H%M)"
|
||||
last=$(ls -d /backup/base* | tail -n1)
|
||||
mkdir $dest || exit $?
|
||||
|
||||
pg_basebackup --pgdata=$dest --format=tar --gzip --username=postgres || exit $?
|
||||
pg_basebackup --wal-method=none --pgdata=$dest --format=tar --gzip --username=postgres || exit $?
|
||||
|
||||
# Clean old base backups, keep the last and the current.
|
||||
for d in /backup/base*; do
|
||||
|
||||
Reference in New Issue
Block a user