Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Aug 2005 17:12:26 +0200 (CEST)
From:      Svein Halvor Halvorsen <svein-freebsd-questions@theloosingend.net>
To:        Norberto Meijome <freebsd@meijome.net>
Cc:        questions@freebsd.org
Subject:   Re: rsync and moving files [Re: backup w/ snapshots]
Message-ID:  <20050829170053.M3014@maren.thelosingend.net>
In-Reply-To: <43131C85.1070100@meijome.net>
References:  <20050828234043.H22315@maren.thelosingend.net> <20050829161506.E2522@maren.thelosingend.net> <43131C85.1070100@meijome.net>

next in thread | previous in thread | raw e-mail | index | archive | help

* Norberto Meijome [2005-08-30 00:32 +1000]
>  isn't that the whole point of having a backup? to have *another* copy of your
>  files?

Well, yes and no.

The idea is that I have a main computer that I want to backup. I want the 
backup to be (a) remote, (b) incremental and (c) random-accessible.

So I thought that every day my backup-server could rsync my main computer, 
creating a mirror of the relevant directory trees. Then, as soon as the 
rsync job completes, it takes a snapshot of the filesystem. This snapshot 
could be mounted r/o and nfs-exported back to the original computer.


Now: If I have a file /foo/test on my main computer. After the first 
rsync-job this file will be copied, assigned an inode and put on the disk 
somewhere. If I change this file, a local snapshot will be smart enough to 
just store the changed sectors that this file now occupies.

But: If I move the file from /foo/test to /bar/test on my main computer, 
rsync will create a BRAND NEW FILE in /bar (and delete the file in /foo, 
since I used the --delete option). Now this NEW file will have a new 
inode, and cover new sectors on disk. The snapshot will then tak 
considerable more diskspace. If I move a large directory tree this way, 
this will occupy huge amounts of diskspace.

If I however, make the snapshot on my local disk, this is not a problem, 
as on this local filesystem /bar/test is not a new file. 

So how can I make rsync know that the files were just moved (renamed, 
relinked), and make rsync reflect this fact on the remote mirror?




>  and I guess that yes, if the files are new in the remote system, when you
>  take a snapshot the difference with the previous snapshot will be the size of
>  the new data 


The files aren't new. Their names are!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050829170053.M3014>