Backup of directory-structure w/o files

Get help for specific problems
Posts: 2
Joined: 6 Feb 2019

juergen

Hello

Objective: I want to have a backup including the full directory structure, even there are empty directories.
Observation: Looks like this does not work completly (or I missed an important option?)

Settings:
sync options "versioning" w/ directory/timestamps
Full backup of "source dir" goes to directory "Backup".
The versioned directories go to "backup.revisions"

What happens:
Step 1: If I do the very first backup, the empty directory structure (which is included in "source dir")is copied correctly to "Backup".
Step 2: I delete the empty directory structure in "source dir"
Step 3: Another sync should move the empty directory structure from "backup" to "backup.revision", but actually it is deleted completely

Did I miss an important option to be set? Or is this a bug?

Thanks a lot for your help
Juergen
User avatar
Posts: 2524
Joined: 22 Aug 2012

Plerry

… Did I miss an important option to be set? Or is this a bug? ...
It is simply a feature not a supported by FreeFileSync (FFS).
As the name already suggests, FFS works at file level.
If, when and where necessary, FFS will create folders/directories to copy (to be) synced files into.

If you use versioning and delete a file from your source location, FFS will move that same file from the destination location (your Backup) to the versioning location (your backup.revisions), retaining the directory structure of that file.
If you use versioning and delete an empty directory from your source location, there is no file to be deleted in the destination location, so FFS has/sees no reason to move that empty directory from the destination location to the versioning location.

Obviously, if you can convince Zenju (the developer of FFS) that adding the requested feature makes a lot of sense, it is possible to add it to his FFS wish list.
However, as presented, the relevance of your use case is not very clear (at least to me).
Why is it important to be able to retrieve a deleted empty directory?
User avatar
Site Admin
Posts: 7285
Joined: 9 Dec 2007

Zenju

It is simply a feature not a supported by FreeFileSync (FFS).
As the name already suggests, FFS works at file level. Plerry, 07 Feb 2019, 08:05
Technically that's not quite it. FFS conceptually deals with all basic types file, folder, symlink, but in the case of versioning it seems there is just not much benefit in preserving empty folders.
Posts: 2
Joined: 6 Feb 2019

juergen

I agree, in case of a solely sync, there is not much benefit of such a feature.
But I am using FFS as a backup tool, including incremental differences over the last X days (thats the reason for the option "versioning").
It now happened just yesterday, a colleague deleted this empty folder structure in the "source directory". It is not such a big deal, but this folder structure was a template structure for a new project. So each time we start a new project, just this template structure is copied to save time setting up the new project. Now, as a consequence, the template structure was unfortunately gone and I could not restore it.
Maybe this could be option, if somebody wants to preserve empty directories yes/no?
User avatar
Posts: 2524
Joined: 22 Aug 2012

Plerry

For those cases, it may be an option to use a dedicated Templates directory, containing all such templates.
And then run not a Mirror sync but instead an Update sync on the Templates directory.
Files and directories that get deleted in the source location, accidentally or intentionally, will then stay in the destination location.
For all other content you can continue to run a Mirror sync.
You can then run the Mirror sync and the Update sync as separate syncs,
or define two left-right pairs, one for your Mirror sync and one for your Update sync, and use local sync setting for at least one of the two pairs.
Don't forget to Exclude the Templates directory from the Mirror (part) of the FFS sync.