Gentoo Archives: gentoo-user

From: Bruce Hill <daddy@×××××××××××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] What utility do you use to sync user files?
Date: Sun, 02 Dec 2012 19:10:27
Message-Id: 20121202190711.GA23914@server
In Reply to: [gentoo-user] What utility do you use to sync user files? by Randy Westlund
1 On Sun, Dec 02, 2012 at 12:21:40PM -0500, Randy Westlund wrote:
2 > I've been using rsync to sync binary files, shell scripts, my
3 > workspace, and random user files under my home directory across
4 > multiple machines. I'm using one server as the master copy, which
5 > makes daily incremental backups of my files to a separate disk with
6 > rsync. At the moment, I have my sync script set up as a Makefile with
7 > the following targets. I run this from multiple workstations.
8 >
9 > It would be nice to use something as easy as svn, but many of my files
10 > are binary. Or something like dropbox would be great. I don't work
11 > from windows, so I don't need a cross-platform solution.
12 >
13 > What utilities do you guys use? Is there a better way to do this? It
14 > would be nice to move everything to the background, but I've already
15 > clobbered a few files by calling this in the wrong order and might
16 > move the Makefile to an interactive script to protect against that. I
17 > have to call 'make clobber' after I remove a local file to push that
18 > change to the server, and if I forgot to call 'make get' first, I have
19 > to fix it manually.
20 >
21 > -------sync makefile--------
22 > get:
23 > rsync -azOuvihh --progress -e ssh $(EXCLUDE) \
24 > --delete \
25 > $(HOST):$(SERVER_DIR) $(LOCAL_DIR)
26 >
27 > put:
28 > rsync -azOuvihh --progress -e ssh $(EXCLUDE) \
29 > $(LOCAL_DIR) $(HOST):$(SERVER_DIR)
30 >
31 > clobber:
32 > rsync -azOuvihh --progress -e ssh $(EXCLUDE) \
33 > --delete \
34 > $(LOCAL_DIR) $(HOST):$(SERVER_DIR)
35 > ------end-------
36 >
37 > -------backup script--------
38 > # if files are already there, hard link
39 > # the last lines mark it as complete and move a soft link pointer
40 > rsync -zavi --progress --delete \
41 > --link-dest=$BACKUP_PATH/current \
42 > $SOURCE $BACKUP_PATH/backup_part_$DATE \
43 > && mv $BACKUP_PATH/backup_part_$DATE $BACKUP_PATH/backup_$DATE \
44 > && unlink $BACKUP_PATH/current \
45 > && ln -s $BACKUP_PATH/backup_$DATE $BACKUP_PATH/current
46 > -------end---------
47 >
48 > Randy
49
50 What about Network File System (NFS)? Our little wiki has an article:
51 https://wiki.gentoo.org/wiki/NFSv4 -- haven't read it yet, though.
52 --
53 Happy Penguin Computers >')
54 126 Fenco Drive ( \
55 Tupelo, MS 38801 ^^
56 support@×××××××××××××××××××××.com
57 662-269-2706 662-205-6424
58 http://happypenguincomputers.com/
59
60 Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting