Skip to content

DFTi/davinci_resolve_postgres_backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Postgres backup

Mac OS X Setup

  • Add setup passwordless pgdump access using ~/.pgpass
  • Make sure it works by running ./backup.rb and ensuring it writes a dump file
  • Determine an interval for backup using the cron syntax
    • e.g. nightly: 0 3 * * * /path/to/backup.rb
  • Open cron: crontab -e
  • Insert the cron code and save the file
  • Verify with `crontab -l

Compression And Restore

It will already be dumped compressed. Commands being used under the hood:

# dump the database in custom-format archive
pg_dump -Fc mydb > db.dump

# restore the database
pg_restore -d newdb db.dump

Reference

http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql/ http://stackoverflow.com/questions/2893954/how-to-pass-in-password-to-pg-dump

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages