![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, my database is not very big so I want to adopt this backup strategy: each 1 hour I want to clone the whole database 'mydatabase' 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. 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 |
#3
| |||
| |||
|
|
I'm writing a script run by cron each hour to do accomplish the backup task. |
#4
| |||
| |||
|
|
On Feb 13, 8:42 am, "filippo" <filippo2... (AT) virgilio (DOT) it> wrote: I'm writing a script run by cron each hour to do accomplish the backup task. As Ed has stated, you do not mention which DBMS you are using so an answer is nearly impossible. However, in most cases copying a file that is actively being updated by concurrent users is similar to playing: http://en.wikipedia.org/wiki/Russian_roulette |
#5
| |||
| |||
|
|
Hello, my database is not very big so I want to adopt this backup strategy: each 1 hour I want to clone the whole database 'mydatabase' 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. 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 |
#6
| |||
| |||
|
|
On Feb 13, 8:42 am, "filippo" <filippo2... (AT) virgilio (DOT) it> wrote: DBMS: unknow OS: unknown |
#7
| |||
| |||
|
|
"greg.fenton" <greg.fen... (AT) gmail (DOT) com> wrote: On Feb 13, 8:42 am, "filippo" <filippo2... (AT) virgilio (DOT) it> wrote: I'm writing a script run by cron each hour to do accomplish the backup task. As Ed has stated, you do not mention which DBMS you are using so an answer is nearly impossible. However, in most cases copying a file that is actively being updated by concurrent users is similar to playing: http://en.wikipedia.org/wiki/Russian_roulette The original message subject was tagged "[postgresql]". I believe that is a DBMS. Why do people not read the subject line? (I have seen this before.) Sincerely, Gene Wirchenko Computerese Irregular Verb Conjugation: I have preferences. You have biases. He/She has prejudices. |
#8
| |||
| |||
|
|
On 13 Feb, 18:28, "Ed Prochak" <edproc... (AT) gmail (DOT) com> wrote: On Feb 13, 8:42 am, "filippo" <filippo2... (AT) virgilio (DOT) it> wrote: DBMS: unknow OS: unknown actually my subject was referring to postgresql, but it seems flown away :-). Anyway I'm using postgresql 8.2 on winXP/Linux machines. I could use pg_dump/pg_restore. pg_dump doesn't have to have exclusive access to database to perform the operation. My only problem is that pg_dump create a backup on a file, the best to me whould be to have a perfect clone (users/ data etc) of original database ready to be used just after the cloning. Is it possible? Thanks, Filippo |
#9
| |||
| |||
|
|
Is there a better way to get what I need? DBMS: unknow OS: unknown ANSWER: use the red one. |
#10
| |||
| |||
|
|
"Ed Prochak" <edproc... (AT) gmail (DOT) com> wrote: Is there a better way to get what I need? DBMS: unknow OS: unknown ANSWER: use the red one. No, the mauve one, it's got more RAM! Jeez, I thought everybody knew that! Paul... Sorry, I'm terrible with colors. 8^) |
![]() |
| Thread Tools | |
| Display Modes | |
| |