Bug - Time Span filter with Mirroring fails to delete

Get help for specific problems
User avatar
Posts: 9
Joined: 8 Sep 2023

mBrane

Premise: Mirroring is supposed to delete objects on the right that are not present on the left.

Issue: When setting a Time Span filter (eg. Last 31 Days), files older than 31 days are not being deleted. This is Update behavior, not Mirror behavior. Therefore, the folders are not properly mirrored.

Suggested fix: The Time Span filter needs to be applied to the destination folder, as well.
User avatar
Posts: 2416
Joined: 22 Aug 2012

Plerry

The Time Span Filter works just like Include/Exclude Filter.
All files that are not in scope of the sync are left untouched, and will not get deleted or overwritten.
And that is exactly how it is designed to be.
See viewtopic.php?t=5123 and viewtopic.php?t=8981 .
User avatar
Posts: 9
Joined: 8 Sep 2023

mBrane

I disagree. A Mirror function that accumulates files is not a Mirror behavior at all. How would that be different from an Update behavior?

Here's the intended use case: I want a mirror of the latest 31 days of files. How would you propose accomplishing this properly "by design?"
User avatar
Posts: 2416
Joined: 22 Aug 2012

Plerry

You may disagree, but FFS does exactly what you tell it to do:
make an exact Mirror (source to target) of all files and folders that are in the scope of the sync.
Per the Time Span filter, you have excluded all files older than 31 days, so those are outside the scope of your FFS sync and are therefore not affected in any way by your FFS sync.

In your use case (a Time Span of the last 31 days), the Mirror sync differs from an Update sync in that in a Mirror sync any files not older than 31 days that were deleted from the source/left side will be deleted from the target/right side, whereas in case of an Update sync such files will remain in the target.

Your intention/expectation is not completely clear:
Do you expect
1) all files older than 31 days to be deleted from the target, or
2) just those of said files that no longer exist at the source side to be deleted from the target?

1) is not a sync action, but can be achieved via a command-line or script.
See e.g. https://www.google.com/search?q=delete+all+files+older+than+x+days

2) can simply be achieved in FFS by not setting a Time Span.
User avatar
Posts: 3977
Joined: 11 Jun 2019

xCSxXenon

Here's the intended use case: I want a mirror of the latest 31 days of files. How would you propose accomplishing this properly "by design?" mBrane, 25 Jul 2024, 20:22
Run a post-script command that deletes anything older than 31 days
User avatar
Posts: 9
Joined: 8 Sep 2023

mBrane

Run a post-script command that deletes anything older than 31 days xCSxXenon, 28 Jul 2024, 14:55
Yeah, that's why I chose a GUI tool like FFS.
User avatar
Posts: 9
Joined: 8 Sep 2023

mBrane

You may disagree, but FFS does exactly what you tell it to do:
make an exact Mirror (source to target) of all files and folders that are in the scope of the sync.
Per the Time Span filter, you have excluded all files older than 31 days, so those are outside the scope of your FFS sync and are therefore not affected in any way by your FFS sync.

In your use case (a Time Span of the last 31 days), the Mirror sync differs from an Update sync in that in a Mirror sync any files not older than 31 days that were deleted from the source/left side will be deleted from the target/right side, whereas in case of an Update sync such files will remain in the target.

Your intention/expectation is not completely clear:
Do you expect
1) all files older than 31 days to be deleted from the target, or
2) just those of said files that no longer exist at the source side to be deleted from the target?

1) is not a sync action, but can be achieved via a command-line or script.
See e.g. https://www.google.com/search?q=delete+all+files+older+than+x+days

2) can simply be achieved in FFS by not setting a Time Span. Plerry, 26 Jul 2024, 15:53
Mirroring should *never* result in the destination having files that are not present on the source side. Period. It's the job of mirroring to delete anything in the destination that isn't present in the source set (whether or not the view of the source set was created by a filter). Period.

1) Take source view.
2) Mirror to destination.

Pretty straightforward. Mirroring deletes the delta. Updating does not.

My intention is not clear? To maintain a mirror of the last 31 days of files? OK...
User avatar
Posts: 2416
Joined: 22 Aug 2012

Plerry

Your intention and opinion are perfectly clear.

But that does not change the fact that FFS does exactly what is written in the manual:
Files and folders are only considered for synchronization if they pass all filter rules
So, any files and folders that do not pass all filter rules are not considered for synchronization; they are outside the scope of the sync. And are thus also not considered for deletion in the target.

Note, that a scope is fundamentally different from a view.