Library is empty each time I reset PC

Hi, I did make an effort to examine doc and look for other posts. I may have missed someone else experiencing this, feel free to redirect me to proper section of doc or other posts if needed.

I am running Desktop PC with Windows 11. Trying out PhotoStructure desktop. I also have a NAS which my PC has a mapped network drive to. I have placed my library on the NAS. I allow PhotoStructure to scan all my drives, the interface populates with all my pictures / video as I would expect. I can see the library folder on the NAS grow in size as things get copied over. Everything is great until I reset my PC. Once I reset my PC and re-run PhotoStructure, the interface shows no pictures and it wants to re-scan.

Is this expected? If not, any thoughts or direction? All of the files seem to remain on the NAS (judging by size of the library folder).

What NAS do you have? If it runs docker, I would take a look at running Photostructure directly on the NAS. If you do that, you’ll be able to pull up Photostructure on your iPad or phone (while on the same LAN) even if your PC is turned off.

I’m pretty sure what your experiencing is not intended, but I personally don’t have any experience with the windows desktop version of Photostructure.

Hmm, I suspect PhotoStructure’s remote filesystem detection isn’t working on your setup, causing SQLite to not persist your library database properly.

You can either store your library db and previews on a fast local disk, or tell PhotoStructure to work around this issue.

More details are here:

What’s PS_FORCE_LOCAL_DB_REPLICA?

Appreciate the response. I checked and made sure PS_FORCE_LOCAL_DB_REPLICA is already set to true (I did read about this previous to posting and gave it a try). I turned logging to info and pulled out some snippets. Not being familiar with how the program works at a low level, I am wondering if what I am reading in the following log experts is showing the removal of the local SQLite DB on startup. I may be way off base here. Regardless, if the below doesn’t reveal what is going on - how do I engage for support? This thread, something else? Very interested in the software if I can make it work for me.

Some of the log excerpts:

{"ts":1660623262621,"l":"info","ctx":"SettingsIO.importFileSettings(C:\\Users\\andrew\\AppData\\Roaming\\PhotoStructure\\settings.toml)","msg":"loaded","meta":{"imported":{"copyAssetsToLibrary":true,"libraryDir":"P:\\PhotoStructure","scanAllDrives":false,"scanPaths":["H:\\iPhone Picture Backups"],"cacheDir":"C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure","forceLocalDbReplica":true,"logCompression":false,"logLevel":"info","exposeNetworkWithoutAuth":true,"maxMemoryMb":1024,"maxRssMemoryMb":8000,"maxSyncFileJobsWhenRemote":4,"processPriority":"AboveNormal"}}}


{"ts":1660623263358,"l":"info","ctx":"ModelDbJanitor(P:\\PhotoStructure\\.photostructure)","msg":"Library on remote drive. Using local db replica.","meta":{"src":"P:\\PhotoStructure\\.photostructure\\models\\db.sqlite3","local":{"nativePath":"C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3"}}}


{"ts":1660623263357,"l":"warn","ctx":"Library(P:\\PhotoStructure)","msg":"Library is on a remote volume. Setting forceLocalDbReplica to true, and maxSyncFileJobsMax to 4 to prevent I/O wait"}

{"ts":1660623263358,"l":"info","ctx":"ModelDbJanitor(P:\\PhotoStructure\\.photostructure)","msg":"Library on remote drive. Using local db replica.","meta":{"src":"P:\\PhotoStructure\\.photostructure\\models\\db.sqlite3","local":{"nativePath":"C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3"}}}

{"ts":1660623263358,"l":"info","ctx":"ModelDbJanitor(P:\\PhotoStructure\\.photostructure)","msg":"Setting up local model db replica...."}

{"ts":1660623263358,"l":"info","ctx":"BaseFile(C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models)","msg":"rmrf()"}

{"ts":1660623263394,"l":"info","ctx":"ModelDbJanitor(P:\\PhotoStructure\\.photostructure)","msg":"Local model db replica set up at C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3"}

{"ts":1660623263397,"l":"info","ctx":"Db(models)","msg":"setting up new db connection to C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3","meta":{"priorWasNull":true}}

{"ts":1660623263397,"l":"info","ctx":"mkdb()","msg":"Dynamically setting dbCacheSize to 192","meta":{"db":"C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3","dbFileSize":671744}}

{"ts":1660623263406,"l":"info","ctx":"SQLite","msg":"verifyDb(C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3): OK"}

{"ts":1660623263410,"l":"info","ctx":"Migration({\"schema\":\"models\",\"db\":\"C:\\\\Users\\\\andrew\\\\AppData\\\\Local\\\\Temp\\\\PhotoStructure\\\\local-db\\\\models\\\\db.sqlite3\"})","msg":"up to latest!","meta":{"appliedMigrations":[]}}

{"ts":1660623263487,"l":"info","ctx":"ModelDbJanitor(P:\\PhotoStructure\\.photostructure)","msg":"Finished setup","meta":{"primaryDbDir":{"nativePath":"C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db"},"replaceDbDir":{"nativePath":"P:\\PhotoStructure\\.photostructure\\models"},"backupDir":{"nativePath":"P:\\PhotoStructure\\.photostructure\\models\\backup"}}}

{"ts":1660623263487,"l":"info","ctx":"ModelDbJanitor(P:\\PhotoStructure\\.photostructure)","msg":"ModelDb reading from C:\\Users\\andrew\\AppData\\Local\\Temp\\PhotoStructure\\local-db\\models\\db.sqlite3"}

{"ts":1660623263487,"l":"info","ctx":"Library(P:\\PhotoStructure)","msg":"Library.setup() finished."}


First off, apologies that things didn’t “just work.”

Could you try an alpha build? https://photostructure.com/go/alpha

For support, if you want to continue here or via discord, whatever works for you.

I’ll be back to my desk tomorrow evening, if you want to send me logs. Details are here:

Thought I would check in and let you know I have been experimenting and trying to come up with a solid set of steps to replicate the issue I am experiencing. I seem to experience it intermittently.

I have not tried Alpha version yet.

I have found if I go manually backup the SQLite DB in the local cache folder (set by cacheDir / PS_CACHE_DIR courtesy of forceLocalDbReplica / PS_FORCE_LOCAL_DB_REPLICA) and things aren’t updated as I expect them to be after a restart, I can go grab that backup and place it in the local cache folder and the folder on the SMB share (in my case P:\PS_Library.photostructure\models) then start Photostructure, and everything I expect to see is there.

I have been concentrating on getting all my media imported. Once that is done, I will play around. If I am able to replicate what I experienced with concrete steps, I will then check alpha build and if it still occurs, I will look up the bug reporting process and submit a bug report.

Pretty awesome software, appreciate your work on it.