AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070309175148.074926b8@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<warren.gale@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
X-Sylpheed-End-Special-Headers: 1
Date: Fri, 9 Mar 2007 17:52:21 -0800
From: Andrew Sharp <andy.sharp@onstor.com>
To: Warren Gale <warren.gale@onstor.com>
Subject: script and cron command to rsync your home directory
Message-ID: <20070309175221.46938f65@ripper.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="MP_.3jiSL+kd1CO9IniTy=_MsK"

--MP_.3jiSL+kd1CO9IniTy=_MsK
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Warren,

You can institute the cron thing, and you can also keep the script in a
place that you can easily execute it if, for instance, you build
something and you want it to be available to someone right away.

Attached is the script.  The cron entry that runs it for me every hour
is:

45 * * * * cd /home/andy/git; /home/andy/bin/git_rsync.sh

As you can see, the cron entry cd's to /home/andy/git, but I've since
hacked the script to cd to whatever directory is in SOURCE_DIR
variable, which you can just edit.  You'll also want to edit the
DEST_DIR or whatever it's called.  As you can see, I don't rsync
everything, just my kernel source.  The trees with our source in it are
just too big and too much churn (makes snapshots take up a lot of disk)
to hammer mightydog with them.

Let me know if you have any questions.

Cheers,

a

--MP_.3jiSL+kd1CO9IniTy=_MsK
Content-Type: application/x-shellscript; name=git_rsync.sh
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=git_rsync.sh

IyEvYmluL3NoCgojIGp1c3QgYSBsaXR0bGUgY3JvbiBzY3JpcHQgZmlyZWQgY29uc3RhbnRseSB0
byByc3luYyBnaXQgZGlyZWN0b3J5CgojIHdlIG5pY2UgaXQgZG93biBmb3Igc29tZSByZWFzb24K
CkJBQ0tVUF9ESVI9L2hvbWVzL2FuZHlzLy5naXQKIyBiZWNhdXNlIHRoZSBiYWNrdXAgaXMgYW4g
TkZTIERJUgpCQUNLVVBfSE9TVD1taWdodHlkb2cKCmlmIHBpbmcgLWMgMSAkQkFDS1VQX0hPU1Qg
OyB0aGVuCiAgICAgICAgbmljZSAtMTUgcnN5bmMgJCogLXV2SGF4IC0tZGVsZXRlIC4gJHtCQUNL
VVBfRElSfQogICAgICAgIGVjaG8gIkJhY2t1cCB0byAkQkFDS1VQX0hPU1QgZmluaXNoZWQgYXQg
YGRhdGVgIHdpdGggZXhpdCBjb2RlICQ/IgplbHNlCiAgICAgICAgZWNobyAiaG9zdCAkQkFDS1VQ
X0hPU1Qgbm90IHJlYWNoYWJsZSBhdCBgZGF0ZWAgZm9yIHJzeW5jIiAKICAgICAgICBleGl0IDEK
ZmkKCg==

--MP_.3jiSL+kd1CO9IniTy=_MsK--
