Because then the data isn't consistent.
Regards
Patrick van Helden
Databasement BV Zilverstraat 101 Postbus 185 2700 AD Zoetermeer
Tel: +31 (0)79 - 361 97 65 Fax: +31 (0)79 - 361 97 68 Mobiel: +31 (0)6 - 23 352 256 E-mail: pvh@databasement.nl Internet: www.databasement.nl en www.datadrama.nl
Support: E-mail: support@databasement.nl support line: 079-3611676
-----Oorspronkelijk bericht----- Van: Eino Tuominen [mailto:eino@utu.fi] Verzonden: dinsdag 4 oktober 2005 8:02 Aan: Hamilton, Tom CC: Patrick van Helden; toasters@mathworks.com Onderwerp: Re: Database scripts
Hamilton, Tom wrote:
Patrick,
Try www.netapp.com http://www.netapp.com/ - look in library/tech reports for reports like http://www.netapp.com/library/tr/3368.pdf
These have such scripts for Oracle - for SQL, use SnapManager for SQL Server.
Let me know if you get any for Postgres!
Why not just take a snapshot from a running database?
From the PostgreSQL manual http://www.postgresql.org/docs/8.0/interactive/backup.html:
An alternative file-system backup approach is to make a "consistent snapshot" of the data directory, if the file system supports that functionality (and you are willing to trust that it is implemented correctly). The typical procedure is to make a "frozen snapshot" of the volume containing the database, then copy the whole data directory (not just parts, see above) from the snapshot to a backup device, then release the frozen snapshot. This will work even while the database server is running. However, a backup created in this way saves the database files in a state where the database server was not properly shut down; therefore, when you start the database server on the backed-up data, it will think the server had crashed and replay the WAL log. This is not a problem, just be aware of it (and be sure to include the WAL files in your backup).
Patrick van Helden wrote:
Because then the data isn't consistent.
In what sense? As the PostgreSQL manual states, atomic snapshot + transaction logs together make a consistent database.
"However, a backup created in this way saves the database files in a state where the database server was not properly shut down; therefore, when you start the database server on the backed-up data, it will think the server had crashed and replay the WAL log. This is not a problem, just be aware of it (and be sure to include the WAL files in your backup)."