Index

Subject : Re: LUG: tar command ???

From : "Tim O'Shea" <tjoshea@ncsu.[redacted]>

Date : Sat, 04 Dec 2004 18:32:28 -0500

Parent


Maybe instead you should consider rsync'ing to a mirror directory on the
external harddrive ?


On Sat, 2004-12-04 at 18:14 -0500, Greg McGowan wrote:
> All,
>
> I'm trying to write a simple script to backup my home directory, and
> I've come upon a question with the tar command.
>
> I see now the easiest way to backup the directory is using:
>
> %tar -cf /mnt/externalharddrive/backup.tar /home
>
> and later on when I want to backup again I'd use:
>
> %tar -uf /mnt/externalharddrive/backup.tar /home
>
>
> The problem is when using the update option with the tar command the
> file gets larger and larger (because update appends the newer files).
> Is there a way to get the tar command to delete the older files in the
> existing backup.tar file?
>
> I understand that it would probably be easier to just re-tar the
> entire directory each time rather than update. However, my /home
> directory has some pretty large files that don't change very often.
> As a result it seems to me that it would be more efficient to just
> back up the files that have been modified since the last back up.
>
> Any help with this is greatly appreciated.
>
> Thanks,
> Greg
--
Tim O'Shea <tjoshea@ncsu.[redacted]>



Replies :