backup database by cloning itself - Mailing list pgsql-general

From filippo
Subject backup database by cloning itself
Date
Msg-id 1171374883.983895.256770@s48g2000cws.googlegroups.com
Whole thread Raw
Responses Re: backup database by cloning itself  (Ron Johnson <ron.l.johnson@cox.net>)
Re: backup database by cloning itself  (Scott Marlowe <smarlowe@g2switchworks.com>)
Re: backup database by cloning itself  ("filippo" <filippo2991@virgilio.it>)
Re: backup database by cloning itself  ("Filip Rembiałkowski" <filip.rembialkowski@gmail.com>)
List pgsql-general
Hello,

my database is not very big so I want to adopt this backup strategy:

I want to clone my database every 1 hour  to another
database 'currenttime_mydatabase' in order to have 24 backup a day,
overwriting the yesterday backups by today-same-time backups.

This is good for me because I have all the backups readily available
to be read by my program (opening the backup read only). This is a
very important for my needs.

I'm writing a script run by cron each hour to do accomplish the backup
task.

My target is to have the backup operation not affecting the users, so
I want to be able to copy a database even if the database is used by
someone.

Can I use
CREATE DATABASE my_backup_database TEMPLATE current_database?

 Is there a better way to get what I need?

Thanks,
Filippo


pgsql-general by date:

Previous
From: "Pankaj"
Date:
Subject: help and Links using postgreSQL with ASP
Next
From: Ray Bannon
Date:
Subject: Union Query Improvement