Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
this is the script that i use to backup my database, it creates a backup with a timestamp and keeps the latest 14 backups, i run it on a daily cron so this script keeps a 2 week daily backup of the database
<pre>
ls -t *.sql | sed -e ‘1,13d’ | xargs -d ‘\n’ rm
echo Done at date +\%Y-\%m-\%d_\%T
pg_dump dbname --username=dbuser > date +\%Y-\%m-\%d_\%T.sql
</pre>
Hi All,
I got similar requirement in one of my project, Where I need to take back and stored the data on remote directory. Could you please let me know Do I need to modify this above script.
Found a handy script here: https://gist.github.com/matthewlehner/3091458
Looks like someone was copying the automysqlbackup script and making it work for PostgreSQL. Seems to work!
Hi, can you help to upgrade postgres to newer version. My db is now on 9.4, want to upgrade to 9.5 and to make sure all my existing database, tables, and pg configurations and settings are transferred to newer one. I am looking for a detailed guide.
When I use
psql -f backup_file postgres
I got all kinds of errors like these:
psql:2016-08-14_02h50m_50_pg-master.bak:15427: ERROR: multiple primary keys for table "accesstokens" are not allowed
psql:2016-08-14_02h50m_50_pg-master.bak:15435: ERROR: relation "accesstokens_token_unique" already exists
psql:2016-08-14_02h50m_50_pg-master.bak:15443: ERROR: multiple primary keys for table "app_fields" are not allowed
psql:2016-08-14_02h50m_50_pg-master.bak:15451: ERROR: relation "app_settings_key_unique" already exists
psql:2016-08-14_02h50m_50_pg-master.bak:15459: ERROR: multiple primary keys for table "app_settings" are not allowed
psql:2016-08-14_02h50m_50_pg-master.bak:15467: ERROR: relation "apps_name_unique" already exists
psql:2016-08-14_02h50m_50_pg-master.bak:15475: ERROR: multiple primary keys for table "apps" are not allowed
psql:2016-08-14_02h50m_50_pg-master.bak:15483: ERROR: relation "apps_slug_unique" already exists
psql:2016-08-14_02h50m_50_pg-master.bak:15491: ERROR: multiple primary keys for table "client_trusted_domains" are not allowed
psql:2016-08-14_02h50m_50_pg-master.bak:15499: ERROR: relation "clients_name_unique" already exists
psql:2016-08-14_02h50m_50_pg-master.bak:15507: ERROR: multiple primary keys for table "clients" are not allowed
psql:2016-08-14_02h50m_50_pg-master.bak:15515: ERROR: relation "clients_slug_unique" already exists
So I need to manually delete each individual database !! It drives me crazy.
How can I force an overwrite ??
I’m using version 9.4.18 within a Docker container.
Cheers! P
I’m using Pg_dump if I need to backup PostgreSQL database on Linux, it’s really the best way. But sometimes I have to work with PostgreSQL on Window, and in that case, I use the simple tool to backup Postgres database - PostgreSQL-Backup http://postgresql-backup.com/postgresql-blog/backup-postgres-database . I wish to use PostgreSQL-Backup to backup Postgres databases on Linux.
This comment has been deleted