Rclone sync flag which uses google drive activity to sync

An example use case scenario would be


source drive has pictures
Drive/Pictures/Jan/18/pic1,jpg, pic2.jpg
Drive/Pictures/Jan/19/pic3,jpg, pic4.jpg etc
My copy drive
Drive2/Pictures/pic1.jpg, pic2.jpg, pic3.jpg, pic4.jpg

I cant use sync because jan/18/ only has 2 pictures and my drive has all pictures in it
Using sync from what I understand will delete all other pictures

what I want is if I actually wanted to delete a picture from jan 18 that it deletes from my pictures copy drive only
Using google drive activity api I feel it could be done

and all people to create a single directory of backups which sync human actions rather than a directory

I think what you really want is sync with a --flatten option... The sync would do what you want in that case.

What you could do is use rclone lsf to keep a record of the files on the copy drive then you could figure out what had changed, something like

rclone lsf -R --files-only sourcedrive: | sort > before
# time passes
rclone lsf -R --files-only sourcedrive: | sort > after
comm -1 before after > deleted-files

deleted-files should have all the files which were in before but not in after.

You could then adjust the file nanes and pipe them into rclone delete with --files-from.

you are extremely good at logical thinking. its a neat way to think about it.

thank you once again

1 Like

it all works!

thank you

1 Like

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