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).