Recover files deleted by restore?

What is the problem?

An update to one of my plugins was not working properly, so I wanted to restore a backup (not knowing that this does not change plugins versions).
However, after restoring a backup from last week, all of my sliced files are gone. Is there a way to restore them?

What did you already try to solve it?

Searched through the SD card in the web application and through SSH, the files are no longer there. Also used Safe Mode, but this did not change anything, the files still seem to be gone.

Hello @Gathaeryx !

OctoPrint excludes uploaded files only on purpose:

grafik

You may open your backup file and have a look if your files are still in there.

Also, when you flashed the old SD card with a new OctoPi, everything is gone.

Writing back the plugins works that way, that they are fetched from the repository and are therefore the up to date versions.

Thanks for the quick reply.
So that means that restoring a backup deletes everything without a warning that all uploads will be removed? In addition to that, my other backups, that did contain my uploads are also removed. So I'm guessing there's no way to restore all the files that have taken years to create...?

So you restored the backup on an already established system?

Actually the backup system is meant to be uses for to setup a new system without grabbing all the plugins etc. manually.

Indeed, I ran it on the same system that I've been running for years. My bad for not realising that that is not its intended use (although a warning would have been nice).

You can try this:

Log into OctoPrint via SSH

Go to folder .octoprint then to uploads

Lookout: There is a dot (.) before octoprint

To get the files, its more easy to use WinSCP

Alright, I'll give that a shot. Currently running a Linux data recovery tool to see if it can see the deleted files, so it'll take a while before I can check. I'll report back after, thanks for the help so far!

If you are running linux, than you can use that of course to go to that folder

Running Windows, so had to do a workaround. But no, the uploads folder is empty unfortunately.

That is bad.

Do you still have the stl files?

I do, so in theory I could reslice them. However, we're talking about hundreds of files over the past 3-4 years, so that would really be my last resort.

You can read the partitions on the SD card, with a PC running Wiindows. No need for Linux !
Just remove the SD card from your Pi, insert it in a SD card reader. Then image the SD card using Win32DiskImager. Then open with 7-Zip the image you just created.
Two birds with one stone : you have a real backup (the SD card image file), and you can access your EXT partitions and individaul files from Windows !

A problem ? You're back to business within 10 minutes.

First, image your SD card before doing anything with recovery tools !!!!!!!

[EDIT] forgot to say... You can mount the disk image on Linux, and access evrything. VirtualBox, Ubuntu, Win32DiskImage and 7-Zip are your best friends..

Thanks for the notice! I've had no problem accessing the Linux partition using some other tools though, and it seems there are still some files there (though they have the label 'deleted' and are 0kb), so perhaps all is not lost.

Okay, final results: recovery tools and the partition image do show some files in the .octoprint.bck folder, but only the filenames can be recovered, the files themselves are empty and 0kb.
Previous backup files that DID contain my files have also been removed when restoring the backup.

Needless to say, I should have read the documentation on the recover feature. But to be fair, this is the first tool I've ever used that works this way, and gives you no warning whatsoever that you are about the completely reset everything, including your files..

I can recommend using Backup Scheduler plugin (I made it) and one of the available plugins that upload the backup to an online source (ie Google Drive Backup or OneDrive Backup). I use the weekly option to do full backups with gcode and daily with gcode and timelapse excluded.

I have restored backups to my existing system when I have had a plug-in cause issues before and it never touched any of my uploaded Gcode files. I have probably 4-5 GB of Gcode files on there.

Ha, I just installed it, I immediately went looking for something like this.
In regards to the online backups, do you know of a way to easily manage keeping only the latest versions?

For Google drive backups if you use the option to remove timestamp, it will just keep uploading the same file name and Google drive version control takes over.

1 Like

True, but doesn't that defeat the purpose of your weekly backup with files? If I understand correctly, the day after it would be overwritten by a version with only your settings.

each of them is saved with a different name, daily, weekly, monthly if using backup scheduler.

image