Using Sync/mirror on monitored folder deletion

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Using Sync/mirror on monitored folder deletion Sat Nov 28, 2020 7:16 pm • by united
I'm using the following reference: https://www.noodlesoft.com/manual/hazel ... g-folders/

"it does say: That is, the contents of “Synced Folder” don’t sync directly to the top level of “Destination Folder,” but rather to subfolder “Synced Folder” within “Destination Folder.” But I would like it to sync/mirror the entire folder including the top level folder. How do we go about doing that??

specifically what i want is:

scenario 1 - which works
monitor folder 1 (MF1)
f1
--sf1-1
f2
--sf2-1
f3

sync folder - monitor folder 2 (MF2)
f1
--sf1-1
f2
--sf2-1
f3

scenario 2 - doesn't work
monitor folder 1 (MF1)
f1
f2
--sf2-1
f4

sync folder - monitor folder 2 (MF2)
f1
f2
--sf2-1
f3 <<- this doesn't get deleted from sync folder monitored folder but if a subfolder change is done it does do that. Essentially desiring mirroring
f4
Last edited by united on Mon Nov 30, 2020 2:16 pm, edited 2 times in total.
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

Also, it would be nice to have an "archive folder" where any changes that occur in the destination folder are stored there so for accidental deletions this can be recovered from that folder.
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

When using sync, any old files should be in the trash.

In your example, if the rules are set up properly, it should remove f3. Can you post your rules, along with the names of the monitored folders?
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:When using sync, any old files should be in the trash.

In your example, if the rules are set up properly, it should remove f3. Can you post your rules, along with the names of the monitored folders?


- Problem is I have hazel monitoring the trash so it wouldn't be able to recover it in time. So an option to archive would be the best fully automated option.

Rules
Image

Monitored Folder 1 - photo1
Sync to folder - photo2

Here is the video. Which shows the root being synced, then the subfolder deletion being synced but the monitored root folder deletion not being synced (folder f3) to photo2 folder
https://www.dropbox.com/s/74kdw8istv6n6 ... 1.mp4?dl=0

Issue: the root level of the monitored folder(photo1) is not deleting on the synced folder (photo2)
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

Ok, the problem is you are monitoring Photo1. That means the rule matches each of the subfolders, including f3. A sync operation can't remove the top level item that it is run on (such as f3). It can only remove children.

See the chapter in the manual as it goes into more detail but you need to monitor the folder that contains Photo1, and have the rule match that.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Ok, the problem is you are monitoring Photo1. That means the rule matches each of the subfolders, including f3. A sync operation can't remove the top level item that it is run on (such as f3). It can only remove children.

See the chapter in the manual as it goes into more detail but you need to monitor the folder that contains Photo1, and have the rule match that.


If sync is not able to remove the top level/root level of the monitored folder then how can you get hazel to do it? So sync can add it but not remove it? odd.

I'm assuming the manual reference you are talking about is https://www.noodlesoft.com/manual/hazel ... g-folders/ ?
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

Yes, that is the chapter. A rule can't match something when it disappears; it only matches against files that exist. So, f3 cannot every be deleted if you are having it match the rule directly. Instead, as stated, if you have Hazel match the folder containing f3, then the rule can actually match and do something.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Yes, that is the chapter. A rule can't match something when it disappears; it only matches against files that exist. So, f3 cannot every be deleted if you are having it match the rule directly. Instead, as stated, if you have Hazel match the folder containing f3, then the rule can actually match and do something.


I see what you're saying about it can't match what doesn't exist. But is there a way to mirror the entire monitored folder to a destination folder with hazel?
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

Yes, as stated earlier and in the manual, you need to move everything one level up. Your rule has to match the folder that contains f3, which also means you have to monitor the folder one level up.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Yes, as stated earlier and in the manual, you need to move everything one level up. Your rule has to match the folder that contains f3, which also means you have to monitor the folder one level up.


Eventually I was trying to utilize this to mirror two drives in a controlled time frame intelligently. Since as the reference states chronosync can do it but it doesn't do it as quickly as hazel can.

so moving up one level isn't an option in this use case. So trying to nudge it back to Mr. Chief Noodler to see what magic he can do . :|

any insight would be helpful.

- sync option with archive folder or
- like an mirror option with archive folder or
- a creative nested rule that would allow a mirroring option and archive option.
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

Why can't you go one level up?
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Why can't you go one level up?


Because I'm not sure what is a level up higher than the root of the volume?
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

You are saying that f3 is at the root? You are trying to mirror a whole drive?
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:You are saying that f3 is at the root? You are trying to mirror a whole drive?



Yes
/Volumes/
--/HD1
----/f3

I thought about mirroring it with hazel but I've read other threads that state it is not advisable and to use other tools like chronosync. So i tossed that idea and was trying to see if this could work just trying to mirror folders
united
 
Posts: 62
Joined: Wed Mar 14, 2012 3:48 pm

You can watch Volumes. Make sure to be careful which rules you put there as every drive is available from there so you don't want to have it matching the wrong drives.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support