yalex2011 / pg_dump_backup

Postgresql databases backup

Home Page:https://yalex2011.github.io/pg_dump_backup/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postgresql databases backup

Build Status codecov HitCount GitHub stars GitHub issues GitHub license Updates Python 3 GitHub (pre-)release

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.

About

Postgresql databases backup

https://yalex2011.github.io/pg_dump_backup/

License:MIT License


Languages

Language:Python 100.0%