PLEASE HELP Files are gone!

i had an old installation of next cloud, but the server crashed, and i had to re build. i had it synced to my nextcloud folder on my desktop computer (manjaro linux) when i got the new installation complete, i opened the sync app, and it deleted all of my data that was on my desktop. please oh please tell me there is a way to get it back!!! 16 years of my child’s pictures are gone!

First. Don’t use your desktop computer. Every write to the same place where your pics were may make the process harder to get them back.
Second. You need an application to recover your pics. I can’t recommend anything, but Google search will help. Also search guides how to use recover applications.
This is how I would do. There may be something I don’t know… So you may get better answers later. :wink:

1 Like

If you don’t have access to the crashed server’s data, then you’re basically out of luck, NC’s purpose is to sync not backup. I guess, this all depends on how your server crashed and what you did to it afterwards.

1 Like

Wow that’s disheartening. You can configure nextcloud to only sync one way IIRC on the desktop client. I guess the files must be on the server somewhere in the data directory where you configured nextcloud to store all the files. I guess for best practice, it’d be good to enable file-versioning in the web ui to avoid losing files that may be accidentally deleted. Also, I’m pretty sure if you backed up the database etc that nextcloud retains deleted files for a prolong period - that’s if you backed up the data directory too.

I don’t think, that this is what happened, but as I said , this depends on what “rebuild” means. If he only re-installed NC, than there’s a chance, that all the files are still on the server, but as @havok wrote, the server itself crashed, it could also mean, formatting the drive and re-installing everything.

REALLY - do not ever mount the fs of your desktop rw before having recovered your missing files.
then get a big external disk and make a block-copy of the partition that contains the deleted files to an image-file; eg dd if=/dev/<HOMEPART> of=/external/disk/HOMEPART.iso bs=<BS of source-disk>
after it’s finished work on the imagefile on the external disk.
since the disk itself is not damaged it should be sufficient to use photorec, which is available for every distro.
to avoid mounting your homepartition you could start your computer with systemrescuecd (i recommend version <6) and do all of the dd stuff from there.
photorec will (probably) find lots of files, but they won’t have their original names. photographic picture files ususally contain metadata which you can then use to identify and rename the files with a tool like eg jhead (also availabe for all distros).
GOOD LUCK!

1 Like

Thank you all for the help!

1 Like