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 365861381F3 for ; Mon, 3 Dec 2012 05:14:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4790021C00B; Mon, 3 Dec 2012 05:14:19 +0000 (UTC) Received: from mail129c7.megamailservers.com (mail129c7-2520.megamailservers.com [69.49.98.24]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A01E221C006 for ; Mon, 3 Dec 2012 05:12:49 +0000 (UTC) X-POP-User: admin.sys-concept.com Received: from syscon7.localdomain (S01060050da7ae68c.ed.shawcable.net [68.149.90.13]) by mail129c7.megamailservers.com (8.13.6/8.13.1) with ESMTP id qB35Cl5x030586 for ; Mon, 3 Dec 2012 00:12:48 -0500 Received: by syscon7.localdomain (Postfix, from userid 1000) id 71ACD20071C; Sun, 2 Dec 2012 22:12:33 -0700 (MST) Date: Sun, 2 Dec 2012 22:12:33 -0700 From: Joseph To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] What utility do you use to sync user files? Message-ID: <20121203051233.GA3415@syscon7.inet> References: 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=iso-8859-1; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CSC: 0 X-CHA: v=1.1 cv=irLj17ZF5ABOTBuyAu2t31N+Nq5xiP0nh7CWcFrUZ/0= c=1 sm=1 a=wom5GMh1gUkA:10 a=C-SE0WOl5zIA:10 a=nDghuxUhq_wA:10 a=8nJEP1OIZ-IA:10 a=C3ZDv51cNVt4vJz/79I2xQ==:17 a=hGzw-44bAAAA:8 a=Y61pCkDiyrlaKLw_HA0A:9 a=wPNLvfGTeEIA:10 a=OrgmiUpE6OMA:10 a=C3ZDv51cNVt4vJz/79I2xQ==:117 X-CTCH-Spam: Unknown X-CTCH-RefID: str=0001.0A020208.50BC34D0.00D4,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-Archives-Salt: 2fca797a-a067-4bd4-802e-80d3e0cfa1b3 X-Archives-Hash: 0bff19a347c9be6d8d5b36eeb5f8439f Here is a good example on using "rsync" http://rsync.samba.org/examples.html I've modified the first one for 7-days incremental backup. -- Joseph On 12/02/12 12:21, 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