Page 1 of 1

Lost all blueprints after PC crash. What to backup and when?

Posted: Fri May 23, 2025 5:18 pm
by DJQuad
Hey all, my PC crashed yesterday and I lost all my blueprints. There's only 1 in there and my blueprint-storage-2.dat is only a few KB. I also tried manually downloading an old save from Steam cloud but no luck. No idea how this happened but I'd obviously like to prevent this from happening again since I lost many hours over the years. Not the biggest deal as I can cobble them back together from older saves but I still wasted a lot of time.

I've done some searching but I'm seeing a lot of conflicting info particularly due to the recent changes to the blueprint system. I thought they are now kept in blueprint-storage-2.dat but I tried creating a new blueprint, saving the game, and the file itself didn't change.

What are the exact files to back up and when exactly should they be backed up?

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Fri May 23, 2025 7:34 pm
by Atraps003
Backing up and restoring your blueprint-storage-2.dat might be more intuitive if you disable "Enable blueprint library Cloud Sync" in other settings.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 4:24 pm
by DJQuad
I don't care if it's backed up to the cloud or not. I just need to know what to back up and when so I can also do versioning.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 5:05 pm
by Loewchen
If you post your log we could tell you.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 5:16 pm
by DJQuad
Attached. Thanks.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 5:50 pm
by Loewchen
I lied, it no longer logs what bp file is used, but it should be blueprint-storage-2.dat in C:/Program Files (x86)/Steam/steamapps/common/Factorio/ and you can verify that by adding any bp into the library and then confirming that the last edit time of the file has changed.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 6:08 pm
by DJQuad
My blueprint file is in C:\Users\djqua\AppData\Roaming\Factorio. It was last updated about an hour ago, but I just added a new blueprint and the file hasn't updated nor did it after saving the game and exiting Factorio.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 6:17 pm
by Loewchen
DJQuad wrote: Sat May 24, 2025 6:08 pm My blueprint file is in C:\Users\djqua\AppData\Roaming\Factorio.
That can make sense, my write data path does not seem default, but it should write to file instantly without the need to save the game or close it. You did add the bp to My blueprints not just to the inventory or Game blueprints?

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 6:24 pm
by DJQuad
It doesn't. That's why I made this post :)

My game blueprints is empty.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 6:29 pm
by Loewchen
Post the log of a session where you add a blueprint to the library.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 6:53 pm
by DJQuad
Here you go

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 7:21 pm
by Loewchen
It saved the file successfully and when it loaded it before it the file was also current.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 7:28 pm
by DJQuad
When did it save though? It didn't when I added a blueprint in-game. I tried that and refreshed File Explorer.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sat May 24, 2025 11:40 pm
by Atraps003
I think cloud sync is causing your issues. Maybe this video is helpful.


Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sun May 25, 2025 8:09 am
by pioruns
DJQuad wrote: Fri May 23, 2025 5:18 pm Hey all, my PC crashed yesterday
Why did it crash? Why your files got corrupted? You sure your hardware is sound? When did you stress tested it the last time?
Check Windows' Event Viewer, System tab, for hardware errors, especially storage.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sun May 25, 2025 4:56 pm
by DJQuad
Atraps003 wrote: Sat May 24, 2025 11:40 pm I think cloud sync is causing your issues. Maybe this video is helpful.

Thanks for that. Did it update as soon as you changed a blueprint or only after a save?

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sun May 25, 2025 4:59 pm
by DJQuad
pioruns wrote: Sun May 25, 2025 8:09 am
DJQuad wrote: Fri May 23, 2025 5:18 pm Hey all, my PC crashed yesterday
Why did it crash? Why your files got corrupted? You sure your hardware is sound? When did you stress tested it the last time?
Check Windows' Event Viewer, System tab, for hardware errors, especially storage.
It probably just overheated. I cleaned out the biggest dustball I've ever seen :D

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sun May 25, 2025 6:09 pm
by Atraps003
It looks like blueprint-storage-2.dat updates when a map is saved or when you exit a map.

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sun May 25, 2025 8:49 pm
by Tertius
It's very easy to lose the cloud stored blueprints when you do a fresh install of Factorio.

Usually, if you run the Steam version of the game, the blueprint storage file is downloaded from Steam as soon as you start factorio.exe and "blueprint library cloud sync" is enabled in the game options and the cloud file is newer than the local file.
Factorio then uses and updates the file while you play. As soon as you terminate Factorio, and "blueprint library cloud sync" is activated in the game options, and the local file has just being updated by the game, the blueprint file is uploaded to the Steam cloud storage.

However, if you install Factorio fresh, this option isn't yet enabled, so the blueprint file isn't downloaded on Factorio start. If you start some game, for example to see if Factorio is working properly, Factorio will create an empty blueprint file if there was none due to the fresh install. If you now activate "blueprint library cloud sync", Factorio will upload this empty blueprint file to cloud storage, because it is newer than the cloud version, overwriting any previous cloud file, so your cloud stored blueprints are lost.

In my opinion a serious flaw in this storage strategy, because you can avoid losing your blueprints on a new install only, if you enable "blueprint library cloud sync" immediately after install and immediately terminate Factorio without ever having started a fresh game, so there was no empty file created and nothing will overwrite the cloud storage. On the next start, the cloud version will be downloaded and everything is fine.

The regular blueprint file is C:\Users\<username>\AppData\Roaming\Factorio\blueprint-storage-2.dat
For cloud sync, this file is being compressed to "C:\Program Files (x86)\Steam\userdata\<steam user id>\427520\remote\blueprint-storage-2.dat.zstd"
The latter file is what you will find if you browse your Factorio Steam cloud storage on the web. To use that file, open it with 7zip, extract blueprint-storage-2.dat from it and store it in C:\Users\<username>\AppData\Roaming\Factorio.

Your Steam cloud storage can be browsed and files downloaded from https://store.steampowered.com/account/remotestorage

Re: Lost all blueprints after PC crash. What to backup and when?

Posted: Sun May 25, 2025 11:42 pm
by DJQuad
I was playing daily for months without issues and I've been playing Factorio for many years. I suspect what happened was after the PC crash my blueprint file somehow got corrupt or reset and a basically empty file got synced with the cloud. I wrongly assumed blueprints are saved within the save file itself. I'm pretty sure it used to before the recent blueprint changes.

No worries I guess. I'm now backing up the blueprint file using FreeFileSync and doing versioning so this doesn't happen again.