Skip to content

vico-research-and-consulting/postgresql-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Activate Backup

For systems without automation.

  • Clone dir
    cd /opt
    git clone https://github.com/vico-research-and-consulting/postgresql-scripts.git
    chown postgres:postgres /opt/postgresql-scripts
    
  • Create Backup volume/disk and mount it to /srv/backup/postgresql
  • Create backup directory
    mkdir /srv/backup/postgresql
    chown postgres:postgres /srv/backup/postgresql
    
  • Activate job
    echo "0 2 * * * postgres /opt/postgresql-scripts/backup-databases.sh /srv/backup/postgresql  5 2>&1| logger -t postgresql-backup" > /etc/cron.d/postgresql-backup
    
  • Assign Zabbix Template to host (Custom__Service__Postgresql__Backup.xml)
  • Run initial backup
    su - postgres
    /opt/postgresql-scripts/backup-databases.sh /srv/backup/postgresql 5
    

About

A really tiny set of scripts to manage databases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages