Postgresql databases backup
Install
git clone https://github.com/yalex2011/pg_dump_backup.git
cd pg_dump_backup
pip install -r requirements.txt
Configure app
For the program to work, you need to edit the ini file.
nano database.ini
Description of the structure of ini file
[db1]
host=localhost
database=postgres
user=postgres
password=postgres
[listdb]
db=postgres
path='/tmp/'
Configure cron jobs
In order to set up cron jobs, you need to modify the /etc/crontab file. Please note that this file can only be modified by the root user. You can edit the crontab file with your favorite text editor, for example
nano /etc/crontab
add this line
0 23 * * * cd /opt/pg_dump_backup && /usr/bin/python /opt/pg_dump_backup/backup.py
Support or Contact
Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.