Deleted a subdirectory - Simple File Versioning doesn't work?

I have been really stupid. I’m on Linux. I have my work directory synced, with Simple File Versioning. Inside there is a subdirectory physics with lots of files. Because I wanted to keep only the version on my desktop (didn’t know if it was changed on my laptop), I did rm -rf work/physics on my laptop. However, of course that must have deleted the files on my desktop…

work/physics is still on my desktop, but only with the directories and files that I was editing when the incident happened in it.

Now, when I look in work/.stversions, there are no files that were touched today, except all directories. There is definitely no backup files in work/.stversions from today… They are all at least a weak old

Did Simple File Versioning break because I deleted a whole subdirectory, or is this expected behaviour?

I guess there’s no way to get back the newest files, but I guess I’m okay with rewriting everything.

As far as I remember, the modification time (which is also the time in the filename) is not updated when the files are moved to .stversions. So, unless you changed the files today, it is not expected that they have a modification time of today.

1 Like

But I’m looking at the OS’ timestamps, those when you write ls -l or tree -D. I think that date is the date of creation or last edit/touch. And looking at the contents, they are not from today :confused:

The file time stamp doesn’t change when the file is moved, and the time stamp added to the name is that of the last write. Perhaps the files weren’t in sync before they were deleted?

The files I was currently editing were preserved. Everything else was deleted. But that doesn’t really explain why there are no files with timestamp from today in .stversions. Does Syncthing somehow know what files I have open in vim, and refrain from deleting them?

I have changed several files today. Also, it’s on my desktop I’ve been working almost all the time, and it’s on my desktop where I look at .stversions.

As for why the files I was currently editing were still in my project dir, maybe it’s because over some period of time this evening, I kept editing and writing to disk, before I realized that most of the files were deleted.

Maybe my project is fully recoverable. I will try to do that. But if it isn’t… I decided anyway to rewrite my project, since I still have the most difficult algorithms and maths.

A good suggestion might be to use git or another version control for projects. Of couse that won’t help you with your missing files.

Also, did you actually check for any files in .stversions/physics? Cause you didn’t mention that.

Also, the log, check the log.

Did you enable Simple File Versioning on the laptop, on the desktop, or both?

If you have versioning enabled on machine A but not on machine B, and you delete a file on machine B, then the versioning on machine A kicks in and saves a copy of the file. If you delete the file on machine A, it’s gone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.