Accidentally deleted NC and restored via backup 🤦🏼‍♂️

Hey guys als gals!

Today I “allowed” myself a major screwup; or an epic fail - however you might want to call it. :face_vomiting:

I have NC installed on shared hosting, but I do have limited shell access, which I was using today. From past upgrades I still had a directory containing NC 16.something. I have no idea why that was still there, but I decided to delete it (inodes were getting a little tight). But instead of deleting the backup-directory, I deleted everything, meaning: both the NC system and the files for syncing. Please don’t tell me, that was “rather dumb”, that I figured out by myself. :crazy_face:

I had a backup that was a couple of hours old at the time. After the backup, only about a dozen files were added and all of these files I have locally. So there is no actual data-loss. The restore is currently running and will probably still take a while (the perks of shared hosting). I do not have a backup of the database with the same age, however, the db was not touched by my mistake, so I thought it would be best to keep it instead of using and older version from a backup too.

My question now is: Does anyone have a suggestion about how I can restore my NC back to what I had before. I’m guessing, the newer database, which has references to files that aren’t in the respective directories (the dozen or so files that were added), will cause some trouble. Should I restore the backup and manually upload the files before I start the NC session again? Do I need to do anything after that? Or am I swimming in the completely wrong direction here?

Thanks for reading and kind regards!

given the fact you db is healthy and only files are lost (which you recover now)

  • after files recovery is complete
  • go on with occ files:scan command - this will align your existing files with the database (e.g. remove files records which don’t exist after restore).
  • then add the files you added after the issues back to the system (e.g. through the UI)…

at this stage you will have healthy server instance - you might need to keep an eye on your client which might become confused with different data set…