Jump to content
LaunchBox Community Forums

Read only'ing the data folder


floodie

Recommended Posts

Hi. What would be the repurcussions of doing this?..... The system will not change settings wise so would this cause a problem?..my reason for doing this is in a hope to prevent the corrupting of the xml's when the power suddenly drops. I realise the simple answer is to not suddenly drop the power however lets assume for a sec that it will and does happen every so often to me. Much appreciated

Link to comment
Share on other sites

I imagine LaunchBox will throw a bunch of internal exceptions, and things like play count or last played info won't be updated.

That said, it sounds like LaunchBox's data backup feature will handle your use case of potential corruption. It's enabled by default under Tolls -> Options -> Data -> Backups, and will create a snapshot of your data folder every time LaunchBox starts and exits. It keeps a rolling set of up to 25 backups. The backups can then be restored through the Tools -> Restore Data Backup menu.

Link to comment
Share on other sites

Hi Frag - Hmm ok. I was even wondering if there was a way, when i get these XML corrupted errors due to power loss and the machine is left with the error in the middle to perhaps have some fancy script run using a clever set of control panel commands that Copies the contents of a Backup to the data folder without having to get keyboard and mouse out everytime.. Dont know if that makes sense

Its frustrating that Launchbox/bigbox does its saving on shut down. Couldnt it do any changes on the fly thus massively narrowing the chances of corrupted files on sudden loss

 

Link to comment
Share on other sites

13 hours ago, floodie said:

Hi Frag - Hmm ok. I was even wondering if there was a way, when i get these XML corrupted errors due to power loss and the machine is left with the error in the middle to perhaps have some fancy script run using a clever set of control panel commands that Copies the contents of a Backup to the data folder without having to get keyboard and mouse out everytime.. Dont know if that makes sense

Its frustrating that Launchbox/bigbox does its saving on shut down. Couldnt it do any changes on the fly thus massively narrowing the chances of corrupted files on sudden loss

 

If you have a 'gold' set of xml files you're restoring from, you could use a batch file to copy them and then launch LB/BB.

Here's a quick batch file which will recover from a backup file, then run LaunchBox. The backup file has been copied from the Backups folder to the top level LaunchBox folder, and renamed to Restore.7z. The batch commands below are saved to a file named Restore.bat, also in the LaunchBox folder. If you then run Restore.bat, it will extract Restore.7z to your Data folder, then run LaunchBox. I've done a quick test with the batch file and it works, but make any backups before running it just in case.

@echo off
ThirdParty\7-Zip\7z.exe x Restore.7z -oData -y -aoa
Start LaunchBox.exe

 

Link to comment
Share on other sites

On 4/15/2021 at 3:53 AM, floodie said:

Hi Frag - Hmm ok. I was even wondering if there was a way, when i get these XML corrupted errors due to power loss and the machine is left with the error in the middle to perhaps have some fancy script run using a clever set of control panel commands that Copies the contents of a Backup to the data folder without having to get keyboard and mouse out everytime.. Dont know if that makes sense

Its frustrating that Launchbox/bigbox does its saving on shut down. Couldnt it do any changes on the fly thus massively narrowing the chances of corrupted files on sudden loss

 

It doesn't do all its saving on startup/shutdown. It *does indeed* save things as they are updated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...