Created
June 14, 2021 16:59
-
-
Save randomcamel/8e5a8f72a163236768267e9ca7ae4dc1 to your computer and use it in GitHub Desktop.
Revisions
-
randomcamel created this gist
Jun 14, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/sh # uses rsync's hard-link feature to mimic the function and structure of Apple's Time Machine. # my server's name is 'shiny', which I evidently used to mount on /backup. TARGET=/backup/shiny date=`date "+%Y-%m-%dT%H:%M:%S"` rsync --exclude=.AppleDouble -aCPv --link-dest=$TARGET/current $HOME $TARGET/back-$date cd $TARGET rm current ln -s back-$date current # I had this disabled, but it was a nice touch. touch $TARGET/../.last-rsync