| Proof of concept (PostgreSQL) |
|
|
|
| Written by repostor | ||
| Monday, 21 December 2009 22:36 | ||
1) Create a script which load data to a database.------------- Windows ----------------
--------- UNIX / Linux ---------# vi insert.sh
2) Run the script--- Windows ---C:\> insert.bat --------- UNIX / Linux ---------# chmod 777 insert.sh # ./insert.sh 3) Do a full backup--- Windows ---C:\Program Files\repostor\Data Protector for PostgreSQL\bin> postgreslbackup -u postgres -f --------- UNIX / Linux ---------# /opt/repostor/rdp4PostgreSQL/bin/postgresbackup -u postgres -f
4) Do an incremental backup--- Windows ---N/A (all the logs are switched automatically) You can force a logswitch manaully: C:\> psql -U postgres psql# SELECT pg_start_backup('label'); psql# SELECT pg_stop_backup(); psql# \q --------- UNIX / Linux ---------N/A (all the logs are switched automatically) You can force a logswitch manaully: # psql -U postgres psql# SELECT pg_start_backup('label'); psql# SELECT pg_stop_backup(); psq#\q 6) Terminate the "insert.bat" / "insert.sh" script7) Do an incremental backupN/A --------- UNIX / Linux ---------N/A 8) Verify content of the "test" table, in test databaseecho select * from test;|psql -U postgres test tid 2009-09-08 14:26:06 9) Drop instanceC:\> del "C:\Program Files\PostgreSQL\8.3\data" # rm /var/lib/postgres/data 10) Restore test database from backupKör kommandot: --- Windows ---C:\Program Files\repostor\Data Protector for PostgreSQL\bin> postgresrestore -u postgres -f -v -t YYYY-MM-DD.HH:MM:SS --------- UNIX / Linux ---------# /opt/repostor/rdp4PostgreSQL/bin/postgresrestore -v -f -t YYYY-MM-DD.HH:MM:SS Där YYYY-MM-DD.HH:MM:SS är någon av datum / tiderna ur listan ovan Tex; C:\Program Files\repostor\Data Protector for PostgreSQL\bin> poestgresrestore -u postgres -f -v -t 2009-11-25.19:11:27 10) Start instanceC:\> net start "PostgreSQL 8.3" # /etc/init.d/postgres start 11) Verify content of test table in test databaseecho select * from test;|psql -U postgres test
|
||
| Last Updated on Friday, 27 August 2010 18:20 |



