r/wal-g-pg: Schedule daily backups
WAL archives are not much good without a base backup onto which they can be applied. Thus, we need to schedule WAL-G to create and upload a backup periodically.
This commit is contained in:
9
roles/wal-g-pg/files/wal-g-backup.service
Normal file
9
roles/wal-g-pg/files/wal-g-backup.service
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=PostgreSQL Backup with WAL-G
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment=PGDATA=/var/lib/pgsql/data
|
||||
ExecStart=/usr/bin/wal-g-pg backup-push --config /etc/postgresql/wal-g.yml $PGDATA
|
||||
Reference in New Issue
Block a user