From owner-freebsd-questions@FreeBSD.ORG Mon Aug 29 15:12:31 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2BC516A41F for ; Mon, 29 Aug 2005 15:12:31 +0000 (GMT) (envelope-from svein-freebsd-questions@theloosingend.net) Received: from signal.itea.ntnu.no (signal.itea.ntnu.no [129.241.190.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43D8F43D48 for ; Mon, 29 Aug 2005 15:12:28 +0000 (GMT) (envelope-from svein-freebsd-questions@theloosingend.net) Received: from localhost (localhost [127.0.0.1]) by signal.itea.ntnu.no (Postfix) with ESMTP id 06DCE33683 for ; Mon, 29 Aug 2005 17:12:27 +0200 (CEST) Received: from maren.thelosingend.net (maren.math.ntnu.no [129.241.211.48]) by signal.itea.ntnu.no (Postfix) with SMTP for ; Mon, 29 Aug 2005 17:12:26 +0200 (CEST) Received: (qmail 3510 invoked by uid 1001); 29 Aug 2005 17:12:26 +0200 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 29 Aug 2005 17:12:26 +0200 Date: Mon, 29 Aug 2005 17:12:26 +0200 (CEST) From: Svein Halvor Halvorsen X-X-Sender: sveinhal@maren.thelosingend.net To: Norberto Meijome In-Reply-To: <43131C85.1070100@meijome.net> Message-ID: <20050829170053.M3014@maren.thelosingend.net> References: <20050828234043.H22315@maren.thelosingend.net> <20050829161506.E2522@maren.thelosingend.net> <43131C85.1070100@meijome.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. Cc: questions@freebsd.org Subject: Re: rsync and moving files [Re: backup w/ snapshots] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 15:12:31 -0000 * 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!