View Single Post
Old 02-23-2020, 05:25 PM   #8
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
It is just a bash script launching calibre and then, when calibre quits, runs rsync. So I think that you could run it fine on a Mac.

Originally it was inspired by Mike Rubel and his site "Easy Automated Snapshot-Style Backups with Linux and Rsync", but rewritten as part of a launch script for calibre.

http://www.mikerubel.org/computers/rsync_snapshots/

I wrote about this already in 2014:

https://www.mobileread.com/forums/sh...d.php?t=244228

That version simply deleted any snapshots after a certain time.

Today I have added better deletion of old snapshots. So now I can keep, for instance, 7 daily snapshots, 4 weekly and 12 monthly snapshots. Or whatever I like.

I use copies of this script for most of my backup needs. I run the scripts automatically using crontab entries on small single drive SBCs running Linux. Odroid HC2s with OMV 4 with 12TB or 16TB HDDs. And a RPi4 with two 8TB HDDs. The scripts backups folders on one NAS to another NAS. Or backup folders on one SSD on my laptop to another SSD on my laptop. Typically calibre libraries.

Here is a current version of my rsync snapshot script:

https://github.com/WikiBox/snapshot.sh

Last edited by Adoby; 02-23-2020 at 05:30 PM.
Adoby is offline   Reply With Quote