From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9FA261381F3 for ; Sun, 2 Dec 2012 20:26:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3400C21C0CA; Sun, 2 Dec 2012 20:25:50 +0000 (UTC) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0470221C0CA for ; Sun, 2 Dec 2012 20:24:12 +0000 (UTC) Received: by mail-we0-f181.google.com with SMTP id t11so814275wey.40 for ; Sun, 02 Dec 2012 12:24:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:organization :x-mailer:mime-version:content-type:content-transfer-encoding; bh=BbtBQ8DE3keJaJ61xrdfwv1xM58hvEEyNMsJcHHrGKY=; b=jaeyu0QH96rp0/2rOSs9sO7t10RrTJt70NRwprOCbgg7b7RKKKT+L33//jpPI+q3nS UhAoAFJhgtofl5qWDJ6DdJmNXe0TZ8bu1RRrEJki4I6fk5lPVmuBbcbWJ4VQ3CRFXCxQ q3IlvCbZxW1ogLsSG/hdMc788UGixhBF/7kRWlcKgxT2v//lebzOuKZW2pCosdPaMZLi VAFEATMmHCIunSNeWDaFh8yH+KQYNYz+n7YqF/zBN7+3cGls8tSiB23vRQtUN/t7Cr30 bL5VLD6UYPDIAT2Attgd00oIgsvdYaXczDH4epH2v3X2pCjFO+V4STiP8XWLV1GyZcOA YwFA== Received: by 10.180.14.162 with SMTP id q2mr6309405wic.21.1354479851614; Sun, 02 Dec 2012 12:24:11 -0800 (PST) Received: from khamul.example.com (196-215-205-177.dynamic.isadsl.co.za. [196.215.205.177]) by mx.google.com with ESMTPS id b1sm9436609wix.11.2012.12.02.12.24.09 (version=SSLv3 cipher=OTHER); Sun, 02 Dec 2012 12:24:10 -0800 (PST) Date: Sun, 2 Dec 2012 22:21:05 +0200 From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] What utility do you use to sync user files? Message-ID: <20121202222105.42091cd4@khamul.example.com> In-Reply-To: References: Organization: Internet Solutions X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 41cf38c2-a8cf-450d-971e-f556231f7acf X-Archives-Hash: a68b2d15a006ae02d78cee32f5174829 As soon as you said "svn" I got the idea you want revisions of files you send to storage, which is a fine idea. Backups are fine, but if you have to work at the granularity of "yesterday or maybe the day before" it can become cumbersome. To my mind the first question to answer is how do you want to commit these files to a revision control system. This determines what you do next. If you want it file-by-file, then getting a single file is a simple svn checkout, but rolling everything back to yesterday (eg for when you accidentally did an rm on .kde or .mail) will be tricky. To do this, commit the files to remote svn and just put up with the hassles of the binary files. Yes, I know binary in SVN is amazingly evil and makes the worst ever out of Redmond look like child's play, but sometimes you have no choice... Or use a revision control system that can deal with binaries OK. All depends on what *you* need stuff to do. If you are happy committing an entire Makefile run and are OK to work with that, then you use an FS (or LVM) that can do snapshots, and make one as the last command in your Makefile. Restores are a case of mount the snapshot, find the file of interest and do what you need with it. It really comes down to the old story of "precisely define first what exactly you want to achieve" and then the tools to do that often present themselves. On Sun, 2 Dec 2012 12:21:40 -0500 Randy Westlund wrote: > I've been using rsync to sync binary files, shell scripts, my > workspace, and random user files under my home directory across > multiple machines. I'm using one server as the master copy, which > makes daily incremental backups of my files to a separate disk with > rsync. At the moment, I have my sync script set up as a Makefile with > the following targets. I run this from multiple workstations. > > It would be nice to use something as easy as svn, but many of my files > are binary. Or something like dropbox would be great. I don't work > from windows, so I don't need a cross-platform solution. > > What utilities do you guys use? Is there a better way to do this? It > would be nice to move everything to the background, but I've already > clobbered a few files by calling this in the wrong order and might > move the Makefile to an interactive script to protect against that. I > have to call 'make clobber' after I remove a local file to push that > change to the server, and if I forgot to call 'make get' first, I have > to fix it manually. > > -------sync makefile-------- > get: > rsync -azOuvihh --progress -e ssh $(EXCLUDE) \ > --delete \ > $(HOST):$(SERVER_DIR) $(LOCAL_DIR) > > put: > rsync -azOuvihh --progress -e ssh $(EXCLUDE) \ > $(LOCAL_DIR) $(HOST):$(SERVER_DIR) > > clobber: > rsync -azOuvihh --progress -e ssh $(EXCLUDE) \ > --delete \ > $(LOCAL_DIR) $(HOST):$(SERVER_DIR) > ------end------- > > -------backup script-------- > # if files are already there, hard link > # the last lines mark it as complete and move a soft link pointer > rsync -zavi --progress --delete \ > --link-dest=$BACKUP_PATH/current \ > $SOURCE $BACKUP_PATH/backup_part_$DATE \ > && mv $BACKUP_PATH/backup_part_$DATE $BACKUP_PATH/backup_$DATE \ > && unlink $BACKUP_PATH/current \ > && ln -s $BACKUP_PATH/backup_$DATE $BACKUP_PATH/current > -------end--------- > > Randy > -- Alan McKinnon alan.mckinnon@gmail.com