View Full Version : Backing up database
prime
01-04-2010, 11:09 AM
Can someone point me in the right direction for backing up the holdem manager databases? on a nightly/weekly basis?
So if our database server goes down we are able to restore the backup to a new holdem manager installation?
Any help appreciated.
Patvs
01-04-2010, 11:36 AM
Just write a auto-backup script...
For example in notepad write:
c:
cd "C:\Program Files\PostgreSQL\8.3\bin\"
pg_dump -U postgres -E sql_ascii -f "E:\HM\backup\%date%" -Fc name of your database
save the file as xxx.bat and add the file to Windows Task Scheduler, and schedule it to run the script every day/week/month...
prime
01-04-2010, 12:28 PM
Patvs your postgres knowledge is becoming a huge help to me!!
We are going to be doing an online backup. I dont think our provider offers any way of directly backing up a postgres database. So i will run your script and then backup the backup files.
Just to confirm, the script you mentioned wont purge the database or anything will it?
Patvs
01-04-2010, 12:42 PM
The script above won't purge anything..... but I'm no SQL expert, I stole that script from a Dutch pokerforum. There also should be a .bat auto-vacuum script if you google it.
On this forum, someone else wrote:
"C:\Program Files\PostgreSQL\8.3\bin\pg_dump.exe -h localhost -p 5432 -U postgres -F c -b -v -f "D:\fg.backup" "HoldemManager"
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.