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 844C91381F3 for ; Sun, 2 Dec 2012 17:23:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19FB421C041; Sun, 2 Dec 2012 17:23:19 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9765621C02C for ; Sun, 2 Dec 2012 17:21:41 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id 16so2960514iea.40 for ; Sun, 02 Dec 2012 09:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=AHAFXRlnBJkvxb/VcqPqmD4gq9tRhzZ3d9fJP54+SiA=; b=Z4JNW+1kARNxY6AXIGAa+OJ9ZakM9dFGqVrSEnha1OHzpwHsfQDmLxmhPJ91mpmftf mCbAxygKw0bmX4Skka4F8Ibk07W+RiRFdlg0rxbCDuOy5z/E62BIOhEbMQ+aN8Kz2DCW zKggyEjI/qwBL+u2zeMxeEubHQGroZgeXvFwQRuWmUy/0hriXQ8qvDfvsarrKUoKcbsN KutoHAQckfZez0bo1CUYJfIl2oW1L2OAPxDT6+sIJFmjbnJy3OHrfFV3VRywajt0EzBo E7ZQuy9AF33Ur6Jka0yHP/Tw1tH6ud5QxZNjOJJ4qaL0IXJS2AczQj8PDqcrSBU/h5N6 CaFg== 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 Received: by 10.50.181.135 with SMTP id dw7mr4154857igc.40.1354468900711; Sun, 02 Dec 2012 09:21:40 -0800 (PST) Received: by 10.64.98.226 with HTTP; Sun, 2 Dec 2012 09:21:40 -0800 (PST) Date: Sun, 2 Dec 2012 12:21:40 -0500 Message-ID: Subject: [gentoo-user] What utility do you use to sync user files? From: Randy Westlund To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: c009f3d0-f4df-4833-91a3-0ea18f6f6b52 X-Archives-Hash: 4fb57fffa7d185269755109423ac687c 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