Backups

For discussion of the Poker Mavens server module and other administration topics
Post Reply
benswan
Posts: 1
Joined: Mon Apr 13, 2020 10:13 pm

Backups

Post by benswan »

Hello everyone. I recently had our server go offline and it scared me to realize that I do not have a backup of the data. Fortunately I was able to get the server back up and running and no data lost. But now I am searching for a way to create nightly backups. My questions is this:

1) What files need to be backed up in case I have to move servers or uninstall/reinstall PokerMavens?
2) What backup solutions are you using?

I am hosting our server on AWS. I'm considering writing a script that copies the files to a new folder and then using an FTP client (FileZilla for example) to pull down to my local machine. Anyone have any better ideas?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Backups

Post by Kent Briggs »

benswan wrote:1) What files need to be backed up in case I have to move servers or uninstall/reinstall PokerMavens?
1. The program setup file.
2. Your license key.
3. Everything in your data folder (System tab -> Help button -> Locate data folder).
DGV-POKER
Posts: 10
Joined: Fri May 27, 2016 3:28 pm

Re: Backups

Post by DGV-POKER »

I use a .bat fil that is set to run a 4am everyday. The bat file copies the poker mavens system folder to my OneDrive cloud folder and it is dated. I also use a bat file to clean up old versions.

@echo off

set curr_date=%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%


mkdir C:\Users\Your User Name\OneDrive\PokerServer\Daily.Backups\%curr_date%_backup


xcopy "C:\Users\Your User Name\AppData\Roaming\Poker Mavens 6\*" C:\Users\Your User Name\OneDrive\PokerServer\Daily.Backups\%curr_date%_backup /S /I /E /Y
segmentlime
Posts: 25
Joined: Wed Apr 22, 2020 4:39 pm

Re: Backups

Post by segmentlime »

Hi Kent,

I am running V7. i would like to automate daily backups. xcopy does not seem to care about files open by another process (the pm7 server) but i still have concerns about taking a backup at the same time as some files (particularly the accounts database) or something like that is in the middle of a update, and being left with an inconsistent backup state. Is there justification for this concern? Can backups safely be done while the player server is active? What about when PM7 service is active?

Right now, to take a daily backup of the full data folder would be satisfactory. My preferred way to do so would be winrar. Right now winrar complains if i try while the PM7 service is active :

Cannot open C:\Users\Public\Documents\Briggs Softworks\Poker Mavens 7\Accounts.db
The process cannot access the file because it is being used by another process.
Cannot open C:\Users\Public\Documents\Briggs Softworks\Poker Mavens 7\AdminData.db
The process cannot access the file because it is being used by another process.
Cannot open C:\Users\Public\Documents\Briggs Softworks\Poker Mavens 7\Language.db
The process cannot access the file because it is being used by another process.
Cannot open C:\Users\Public\Documents\Briggs Softworks\Poker Mavens 7\Logs\EventLog2023-03-07.txt
The process cannot access the file because it is being used by another process.
Cannot open C:\Users\Public\Documents\Briggs Softworks\Poker Mavens 7\PlayerData.db
The process cannot access the file because it is being used by another process.
Cannot open C:\Users\Public\Documents\Briggs Softworks\Poker Mavens 7\System.db
The process cannot access the file because it is being used by another process.

For now I am thinking to stop the PM7 service from a bat file with net stop command, run winrar, and then net start command.

It is probably cleaner if I shut down the player server first, right? Is there API i could run from curl to do this?

In future, if I was looking as far as making an announcement of a pending shutdown, preventing new tournaments from starting, confirming all tournaments had ended, and terminating all ring games in a controlled way before actually doing the shutdown, do you have any example scripts or suggestions for how to do this?

As always, I appreciate all your support.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Backups

Post by Kent Briggs »

The API is only active when the site is "Online" so it can't be used to automate a shutdown and restart.

Currently the only transaction-safe way to backup the databases (while online) is to manually use the download feature in the admin console:

System tab -> Help button -> Display Data folder -> select a .db file and click the down arrow button.

That works because it pauses the database transactions for that particular file until the download completes.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Backups

Post by Kent Briggs »

segmentlime wrote: Tue Mar 07, 2023 4:45 pm In future, if I was looking as far as making an announcement of a pending shutdown, preventing new tournaments from starting, confirming all tournaments had ended, and terminating all ring games in a controlled way before actually doing the shutdown, do you have any example scripts or suggestions for how to do this?
I don't have any example scripts but it would take several API calls. For example call TournamentsList and check the Status field to make sure none are running. Call RingGamesOffline to take a ring table offline after the current hand completes.
ftpjesus
Posts: 164
Joined: Fri Dec 30, 2016 1:54 am

Re: Backups

Post by ftpjesus »

Maybe more then ya want to spend but I use Acronis and its like $50 a year and itll do active backups for you with the server online.. There are other options that will also accomplish the same thing. I just like the cloud backup because its pretty much foolproof if things implode.

https://www.acronis.com/en-us/products/ ... asing/new/

Theres also crashplan which is like $9/mo and can do backups automatically ever 15min of your server even
Owner Operator of (TBA)
http://www.( TBA ) .com (Home Page)
http://www. (TBA) .net (Play Money)
http://www. (TBA) .eu (BTC Token tied currency and Stable Coins through Crypto quasi real money play)
Post Reply