Hyper Backup using Rsync - destination folder size too big

Currently reading
Hyper Backup using Rsync - destination folder size too big

12
0
NAS
DS1819
Operating system
  1. Windows
Last edited:
Hi All,

I have backups running (thanks @Rusty and @EAZ1964 ) from 1st synology nas to 2nd NAS using Hyperbackup with the following 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

The issue is that the backup folder on the 2nd NAS is becoming too big as it reserves all backup files from the 1st NAS which is by design.

I am looking for something which can check files on 1st NAS and 2nd NAS, identify excess files replicated on the 2nd NAS and delete them.

I tried using the following
  • creating another hyper backup task using rsync without the 'reserver backup file at destination' option. Cannot do this as the shared folder in 1st NAS is already in use in another task
  • creating a SHARED FOLDER SYNC job in Control Panel. This creates another copy which is actually the opposite of what i want and cannot work.
My 2nd NAS is at a differnt location (different WAN IP). One way i could thing of doing this is to connect a PC to the 1st or 2nd NAS and run a robocopy script like:

net use X: \\WAN_IP\folder /user:domain\user password #1st NAS​
net use Y:\\internal_IP\folder /user:domain\user password #2nd NAS​
robocopy X:\INS Recover Y:\INS Recovery /E /XC /XN /XO /XL /purge /COPY: DAT /MINAGE:7 /W:1 /R:1​
net use X: /delete /Y​
net use Y: /delete /Y​

Is there something within the synology NAS which can do the above instead?
 
I am looking for something which can check files on 1st NAS and 2nd NAS, identify excess files replicated on the 2nd NAS and delete them.
So just we are all on the same page you are looking for mirroring then as the end result? Or did I misunderstood the whole point?

Because if it's mirroring you are after then you could use 2 other options. A) sync shared folders (1-way), or B) Drive share sync (2-way).

Also, you could use rsync on your NAS via Task Scheduler and configure a rsync mirror method that will trigger on a schedule of your choice (then you don't have to use HB tool at all). Just google a bit rsync one-liner for mirroring.
 
you could use rsync on your NAS via Task Scheduler and configure a rsync mirror method that will trigger on a schedule of your choice (then you don't have to use HB tool at all). Just google a bit rsync one-liner for mirroring
I made the below after some trial and error on source NAS - Task Scheduler. The below cron job is able to delete files from the destination which are not on the source

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 this possible?

I came across this but am not sure it will work
rsync -avqz --stats --delete /path/to/source user@wan_ip:/path/to/destination
find /path/to/destination/* -mtime +7 -exec rm {} \;
 
So just we are all on the same page you are looking for mirroring then as the end result? Or did I misunderstood the whole point?

Because if it's mirroring you are after then you could use 2 other options. A) sync shared folders (1-way), or B) Drive share sync (2-way).

Also, you could use rsync on your NAS via Task Scheduler and configure a rsync mirror method that will trigger on a schedule of your choice (then you don't have to use HB tool at all). Just google a bit rsync one-liner for mirroring.
I made the below after some trial and error on source NAS - Task Scheduler. The below cron job is able to delete files from the destination which are not on the source

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 this possible?

I came across this but am not sure it will work
rsync -avqz --stats --delete /path/to/source user@wan_ip:/path/to/destination
find /path/to/destination/* -mtime +7 -exec rm {} \;
 

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

As long as you have the whole task backed up, you can set up a "new" task and relink to that archive, as...
Replies
49
Views
3,876
  • Question
The reason to use the desktop Hyper Backup Explorer would to access/recover your data files from a...
Replies
7
Views
771
  • Question
You can only have one backup task configured in the Mac/PC Drive client. Since I’ve never done it, I can...
Replies
1
Views
441
I try to keep things simple. I use mapped drives via SMB to my NAS to store data. Keep as little as...
Replies
4
Views
623
This page How do I migrate data between Synology NAS via Hyper Backup (DSM 6.0 and later)? - Synology...
Replies
2
Views
803
Welcome! To start, the switch here is probably not the issue but just to be on the safe side, check in...
Replies
1
Views
1,181
A few months old. Migration went ok but I had to reinstall a few packages which was slightly annoying but...
Replies
5
Views
1,030

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Back
Top