From b0d6984392f748d7e4ba2064e379e6d8d4d11180 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 24 Jan 2014 03:17:05 +0100 Subject: [PATCH] bin/srsync,bin/srsync-incremental: Add --sparse. --- bin/srsync | 6 +++++- bin/srsync-incremental | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) 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 \ || { -- 2.44.1