rsync - delete files from destination which are not on source and are 1 week old

Currently reading
rsync - delete files from destination which are not on source and are 1 week old

12
0
NAS
DS1819
Operating system
  1. Windows
I have hyperbackup running from source NAS to destination NAS with the below settings
  • Backup type - Rsync
  • Options - reserve backup file at destination
  • With this i have a backup method that results in a file/fodler structure in the 2nd NAS, withut the hyperbackup proprietary format or tools
I have the below cronjob on source NAS via task schedule which deletes files on the destination NAS which are not present in source NAS.

rsync -avh --delete /path/to/source user@wan_ip:/path/to/destination

I want to modify the cron job so that it deletes files from destination which are not present on source and 1 week old.
something like:

rsync -avh --delete(1 week old) /path/to/source user@wan_ip:/path/to/destination

Is there a way to do this?

THe source and destination NAS both have multiple folders on which this Job has to run.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I made the below after some trial and error on source NAS - Task Scheduler. The below cron job is able to...
Replies
3
Views
2,576
Depends on my needs but in general correct. I use a combination of snapshots and various remote backups...
Replies
4
Views
4,652
Sounds like Drive Share Sync is what I need. Thanks. EDIT: The indexing process kicked off by Drive...
Replies
4
Views
5,226
Why not use Hyper Backup (single file option) for your rsync task? I use it this way for years and it’s...
Replies
1
Views
3,207
Would recommend using HB for all your backup tasks. It will have a detailed log and track record of all...
Replies
3
Views
2,637
Just stop where you are if you "tons of space". Don't even consider a hot spare (search my post history...
Replies
9
Views
2,011
  • Question
AFP shows its age also because of security vulnerabilities ...
Replies
3
Views
2,391

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top