Ok, I could probably spend a lot of time writing a complex set of bash scripts that would accomplish this, but I'm hoping this functionality already exists somewhere.
I have a device in my car which functions as a dashcam. I records video in 3-minute segments. When I get home, it automatically connects to the wifi, and starts an ssh daemon.
I want something which I can call from cron, to ssh in, and rsync the videos to my linux machine. So far this is easy. What I want to do then, is delete files from the dashcam device, but not ALL of them - I want to delete ONLY ones that are older than X days. And I want this somehow tied in with the rsync so it absolutely only deletes them if rsync knows it has copied them.
If rsync had an option like "-remove-source-files-older-than" it would work perfectly.
EDIT: Perhaps there is some tool other than rsync that would be better suited for this task?