Skip to content

VasylShevchenko/backup_psql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Readme for Backup PostgreSQL

PSQL show databases

$ sudo su - postgres
$ psql -U postgres -W
$ \list
$ \q
$ exit

Run with command line

$ ./main.sh Name_DB_for_create_dump

Crontab

$ crontab -e

add line

0 23 * * * /bin/bash -l -c 'cd /home/deployer/backup_psql && ./main.sh Name_DB_for_create_dump'

Backup db every day

Other

Run backup and write log

err!!!

$ ./psql_dump_script.sh Name_DB_for_create_dump &>> log/psql_dump_script_log.log

log!!!

$ ./psql_dump_script.sh >> log/psql_dump_script_log.log

#TODO

  1. Add size dump to log

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages