Sync only the last 500 files (stignore+??? in Receive Only)

Hello,

Current Scenario: A, B and C are all set to send and receive.

A creates a Last500Files containing the last 500 files based off create time with Include Pattern (bash script)

example: !Last500Files !FileOne !FileTwo !FileThree […snip…] !File500 *

D has space constraints, and is set to Receive Only and has a #include Last500Files in .stignore

The final piece of the puzzle is, D never deletes files that get out of the moving window of recent files.

What are my options here to perform the “cleanup” on D - is it something syncthing can handle or do I just write a cron to delete all files older than the 500th newest file? **Can I put a (?d) pattern on *** ?

Thanks

Syncthing won’t delete those files for you. You can do it manually. Fundamentally this is not a use case well suited to Syncthing.

1 Like

Understood - I thought I could be fancy by encapsulating as much as possible within syncthing. (As in, both sides didn’t need to be aware of the “constraint” - just A setup the constraint and D enforced it).

But I will do as you said and do it manually - thanks for the info!

1 Like

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