Skip to content

Script to backup up all or specific PostgreSQL databases on a machine

License

Notifications You must be signed in to change notification settings

cbachich/postgres_backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

PostgreSQL Backup Script

This script is used to backup all or specific PostgreSQL databases from your local machine. It keeps the latest 7 files and removes older files in the same directory. The number of files it keeps can be changed in the options.

Usage

postgres_backup [options] [DATABASE_NAMES]

Options

-n, [--numfiles NUMBER] # Number of files to save (deletes older files)
                        # Default: 7
-a, [--all]             # Save all databases to a single dump file

Example

Generate a single backup of all your databases and keeps up to 14 of those files.

postgres_backup --numfiles 14 -a

Generate a backup of two specific databases.

postgres_backup library flight_logger

License

MIT

About

Script to backup up all or specific PostgreSQL databases on a machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages