PDA

View Full Version : How to restore from db.backup



greglbg
February 27th, 2019, 23:24
This might already be answered, but I can't find it on the forums. How do you restore from a "db.backup" file? My system crashed today and dumped all my data. I have a backup but it isn't as recent as I want and I was hoping to use the db.backup xml file the system created to get a more recent copy.

Zacchaeus
February 28th, 2019, 00:09
Hi Greg welcome to FG.

First make a copy of the entire campaign folder. Then rename the file called db.xml to something else, then rename the backup to be db.xml. Then start FG and load the campaign.

Having said that the backup.db file is actually a file created when you started the last session and then gets deleted if the session ends properly. If the session doesn’t end properly then when you restart FG and the file is there it gets renamed as the backup. So you db.xml should be more recent since it gets saved to every five minutes or so. Of course if that got corrupted then the backup will be the most recent complete file.

greglbg
February 28th, 2019, 00:27
that is a ton of help, thank you!

damned
February 28th, 2019, 01:15
On point - dont rename the backup or session files.
Copy the one you want to use and then rename that copy.
If something else is going on with your system and that restored file gets crashed too you dont want to have just nuked your backup - only the copy of the backup.
I hope that makes sense....

KILLGORE
March 4th, 2019, 19:11
You should include a copy of this in the Users Manual as I have to google it every time it happens. I now own a PDF...

May I ask what the session files might be used for? I have a couple campaigns with several of these files in them. Can I clean the folder up by deleting them?

Zacchaeus
March 4th, 2019, 19:49
Every day that you open a campaign in FG it creates a new session file. It's just another type of backup. So yes you can delete older ones since they'll probably have very little in them. But you do want to keep a few, the most recent ones date-wise or the largest ones just in case your backup file also gets corrupted.

Trenloe
March 4th, 2019, 19:51
If you have any concern about having to go back to old session files, ZIP some of the files into an archive before you delete them - you'll generally get a good level of compression.

KILLGORE
March 6th, 2019, 06:25
Could either of you explain how the program makes it backups? When I hit /save and it confirms it saved the campaign, what did it do? Whats the best way to preserve my data on there?

damned
March 6th, 2019, 06:34
The game stores the db in RAM while you are playing.
Every 5 minutes, plus when you /save, plus when you Exit cleanly - it writes that data to db.xml

Once per day it also writes an additional backup.

LordEntrails
March 7th, 2019, 00:21
Once per day it also writes an additional backup.
Do you know if it is the first or last save of the day?

Zacchaeus
March 7th, 2019, 00:36
Do you know if it is the first or last save of the day?
How do you know that it isn’t in the middle ��

Bidmaron
March 7th, 2019, 11:22
How would it know when it is the last?

KILLGORE
March 7th, 2019, 21:46
Ok I found another issue I could use some help with. My Character Manager lost its data. There are no characters in the folder. Is there a restore procedure for this side of FG?

Trenloe
March 7th, 2019, 21:48
Ok I found another issue I could use some help with. My Character Manager lost its data. There are no characters in the folder. Is there a restore procedure for this side of FG?
Look in <FG app data>\characters there'll be FG XML files with <ruleset name>.xml and also backup session files.

KILLGORE
March 7th, 2019, 22:34
There is 1 xml for PFRPG which I am missing my Pathfinder characters. But no backup sessions just various rule set folders. What should I do here?

Trenloe
March 8th, 2019, 01:14
There is 1 xml for PFRPG which I am missing my Pathfinder characters. But no backup sessions just various rule set folders. What should I do here?
Were the PCs created on the same computer under the Manage Characters -> ruleset selection or where they created on another computer? Or did you use Manage Characters -> campaign to view PCs you control in a campaign?

Varatta
April 21st, 2020, 00:03
So I recently lost all of FG but used a recovery tool to find db.xml file and db backups and db session files. How do I restore those? no campaign folder left anymore, sadly. Though do have campagin xml document and campaign registry.lau

Also lost a big mod of custom content - couldn't recover a .mod file but did recover an xml by the same name - any way to recover that into a .mod file?

LordEntrails
April 21st, 2020, 06:02
Create a new campaign, exit FG. Then replace the db.xml and other files you recovered for those in that campaign. Start up and see if you got lucky.

Do they same things for your module xml.

Otherwise might have to get into manually editing those xml files.

Oh, and do all you testing with COPIES not the originals of the recovered files :)

Varatta
April 21st, 2020, 06:48
So that worked for the campaign, sadly it wasn't the campaign I was looking for. =P Back to digging through lost files. Great to know it works.

FYI, the .mod did not recover from the xml of the same name. I put it in the modules folder and couldn't find it in the game. Is there a resource on manually editing an xml to recover it as a .mod? How do I do something like that?



------------------------
Update: got an undelete/recovery tool and after MANY hours of searching found my old files, restored them and the old campaign works again! Now just need to move over to unity! =) Thanks for the help everyone.

Grolsch Van Eyke
May 1st, 2020, 01:50
34673

Ahoy all! I'm following this thread after losing my campaign data. I went in and renamed a backup db.xml file to the new db.xml file but still no characters, no encounters, no campaign notes, all of the images I've added are there. Any suggestions ?

Moon Wizard
May 1st, 2020, 08:11
Don't use the backup files; those are used for database migration points. Use the session files which are created once each day (the first time you open).

Regards,
JPG

Scootrue
May 8th, 2020, 00:01
What if I don't have any file named db.xml in my campaign folder? I tried renaming the last session to db.xml, but it just ran a newer session with none of the lost files.

LordEntrails
May 8th, 2020, 00:21
What if I don't have any file named db.xml in my campaign folder? I tried renaming the last session to db.xml, but it just ran a newer session with none of the lost files.
Please provide a screenshot of all the files with details shown (file size, date, etc) in your campaign folder.

KILLGORE
May 8th, 2020, 01:52
Check the date it was made and find another backup with or around that date and try that one.

prometheus13
January 13th, 2021, 18:47
I had this issue today and there were two files in the campaign directory.

Both were XML files but one was named "db.xml" and the other was "db"

I was not able to recover the campaign until I replaced the one named "db"

Character portraits were gone though even though everything else looks good.

Trenloe
January 13th, 2021, 19:00
I had this issue today and there were two files in the campaign directory.

Both were XML files but one was named "db.xml" and the other was "db"

I was not able to recover the campaign until I replaced the one named "db"

Character portraits were gone though even though everything else looks good.
The file you need to replace is db.xml. You didn't see the .xml extension as you'll not have "file name extensions" selected in the Show/Hide section of the View tab in File Explorer. So, make sure you have that option selected and operate against db.xml. The other file you mentioned would have been db.xml.xml - and would have probably been from a previous manual copy as FG wouldn't create such a file.