Thread: Advise on restoring from FileSystem backup

Advise on restoring from FileSystem backup

From
"Porwal, Utkarsh"
Date:

Hi All,

 

I am taking a filesystem backup of the postgress data directory with the db stopped since I don’t have pg_dump backups. Can you suggest how to restore it from this backup?

 

Can I stop the db, delete the actual data directory and move back the backed up data directory and start postgress?

 

Thanks and Regards,

Utkarsh Porwal

Re: Advise on restoring from FileSystem backup

From
Scott Ribe
Date:
On Sep 7, 2015, at 10:48 AM, Porwal, Utkarsh <utkarsh.porwal@emc.com> wrote:
>
> Can I stop the db, delete the actual data directory and move back the backed up data directory and start postgress?

Yes, but first move the current data directory, don't delete it until you're sure the new is working.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice







Re: Advise on restoring from FileSystem backup

From
Scott Ribe
Date:
On Sep 7, 2015, at 10:55 AM, Porwal, Utkarsh <utkarsh.porwal@emc.com> wrote:
>
> But the filesystem backup should work, isn't it?

Yes, if:

- You've actually stopped the db when you think you have.
- You've actually correctly copied the data directory.
- Nothing mysterious was modifying the data while you were copying it.

--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
https://www.linkedin.com/in/scottribe/
(303) 722-0567 voice