From: Simon Ruderich Date: Fri, 24 Jan 2014 02:17:05 +0000 (+0100) Subject: bin/srsync,bin/srsync-incremental: Add --sparse. X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=b0d6984392f748d7e4ba2064e379e6d8d4d11180 bin/srsync,bin/srsync-incremental: Add --sparse. --- diff --git a/bin/srsync b/bin/srsync index 28dff09..81000fb 100755 --- a/bin/srsync +++ b/bin/srsync @@ -2,7 +2,10 @@ # rsync shortcut with options "everybody" needs. -# Copyright (C) 2011-2012 Simon Ruderich +# Be careful when restoring /boot with --sparse, GRUB doesn't support sparse +# files (e.g. the kernel). Therefore don't use --sparse in this case. + +# Copyright (C) 2011-2014 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,6 +29,7 @@ exec rsync \ --human-readable \ --archive \ --hard-links \ + --sparse \ --numeric-ids \ --one-file-system \ "$@" diff --git a/bin/srsync-incremental b/bin/srsync-incremental index 644b2fe..7fe898a 100755 --- a/bin/srsync-incremental +++ b/bin/srsync-incremental @@ -5,7 +5,7 @@ # Thanks to http://www.sanitarium.net/golug/rsync_backups_2010.html for the # idea. -# Copyright (C) 2011-2013 Simon Ruderich +# Copyright (C) 2011-2014 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ fi mkdir current rsync \ --verbose --itemize-changes --human-readable \ - --archive --hard-links --numeric-ids --one-file-system \ + --archive --hard-links --sparse --numeric-ids --one-file-system \ --link-dest="$dest" \ "$@" current \ || {