User Tools

Site Tools


postgresql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
postgresql [2018/07/24 15:11]
mstraub [Incremental Backups on Localhost]
postgresql [2018/07/24 15:21]
mstraub [Incremental Backups on Localhost]
Line 703: Line 703:
   sudo -u postgres pgbackrest --stanza=STANZANAME --log-level-console=info check   sudo -u postgres pgbackrest --stanza=STANZANAME --log-level-console=info check
  
-Make backups (e.g. from a cronjob)+Make backups ​manually ​(e.g. from a cronjob)
  
   sudo -u postgres pgbackrest --stanza=STANZANAME --type=full --log-level-console=detail backup   sudo -u postgres pgbackrest --stanza=STANZANAME --type=full --log-level-console=detail backup
   sudo -u postgres pgbackrest --stanza=STANZANAME --type=incr --log-level-console=detail backup   sudo -u postgres pgbackrest --stanza=STANZANAME --type=incr --log-level-console=detail backup
 +
 +Make regular backups via cronjob
 +
 +<file - /​etc/​cron.d/​pgbackrest>​
 +#minute hour day-of-month month day-of-week user command
 +0 4 * * 0   ​postgres pgbackrest --type=full --stanza=STANZANAME backup
 +0 4 * * 1-6 postgres pgbackrest --type=diff --stanza=STANZANAME backup
 +</​file>​
  
 Restore latest backup. The cluster must be stopped and the cluster directory must exist and be empty. Restore latest backup. The cluster must be stopped and the cluster directory must exist and be empty.
postgresql.txt ยท Last modified: 2020/07/15 09:42 by mstraub