Thread: Is there any way to recover updated values from the table(Need old value)

Is there any way to recover updated values from the table(Need old value)

From
gajendra s v
Date:
Hi All,


Is there any way to get history value in postgres database because in one table unfortunately we have updated value but we need old data check ,Is there any way to find old (Same table has updated multiple times),We need oldest data, please inform me is there any way to recover data?

Thanks in advance
Gajendra
On 7/29/2014 12:50 PM, gajendra s v wrote:
> Is there any way to get history value in postgres database because in
> one table unfortunately we have updated value but we need old data
> check ,Is there any way to find old (Same table has updated multiple
> times),We need oldest data, please inform me is there any way to
> recover data?

got backups?

if you have a basebackup and a complete WAL archive, you can do a
'point-in-time recovery' up to some time prior to the updates that
overwrote your data and retrieve the old values at that transactional point.

--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



On 7/29/2014 1:06 PM, gajendra s v wrote:
> Thanks for quick reply.
> Sorry I didnt get base backup means, but I have database dump of every
> day ,our database is in AWS EC2.

so take a dump from before you overwrote the data you need, restore it
to a scratch database, and copy out your data.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



On 7/29/2014 1:29 PM, gajendra s v wrote:
> Sorry to disturb you again, I have imported old backup, is there any
> way to find how many times transaction has happened for 24 hrs
> duration to perticular table with update query because by mistakenly
> our java application has update different values ones.

the backup dump just stores the current values.  and, postgres stores no
history of transactions or anything, unless you've implemented some sort
of auditing mechanism such as triggers that log update/insert events
into special audit tables you've created.




--
john r pierce                                      37N 122W
somewhere on the middle of the left coast