I need to take incremental backup of Postgres DB. I need to capture (backup of) daily changes on a database. So that I can restore DB with any particular data I want.
As per Continuous Archiving, I am doing below steps:
- I configured
postgresql.conf, and added
- Restart server
- Added some data
- Take backup of data dir
- Added more data
- Take backup of wal dir and
- Replace backup data (from step 5) in data dir
- Start server
pg_xlog(from step 8) in current
- Restart DB
Now I want data which I added in step 7. (I had taken backup of WAL file and pg_xlog at that time). So I consider this data as a backup of a particuar day. And I want to restore my database with this date's data.
Now If I replace those files ie. WAL and pg_xlog and recreate recovery.conf and restart db, I do not get the data in step 7, still old one.
Please let me know if I am missing anything.