Gentoo Archives: gentoo-user

From: BRM <bm_witness@×××××.com>
To: Users Gentoo <gentoo-user@l.g.o>
Subject: [gentoo-user] Backups...
Date: Sat, 27 Feb 2010 20:03:19
Message-Id: 103865.17113.qm@web65413.mail.ac4.yahoo.com
1 Well, now that I've got my systems cleaned up, and KDE3 removed, I'm tackling another project I've been meaning to do - backups.
2
3 Here's my basic plan:
4 - I've got a directory on my server that I want to synchronize several systems with (some linux, and one Windows).
5 - I want clients to push the backup; and not the server to pull it.
6 - Clients may backup more than once a month.
7 - the server will receive an additional backup itself once a month which includes all the client backups (may be more often, not sure).
8
9 At least on the Linux Systems, I've settled to using rsync for the backup - easy enough to do. I'm already running an rsync server for hosting portage, so it's relatively trivial to add another rsync module to support that way, though I'm not sure what the best way is.
10
11 rsync in attractive since it will do delta transfers to keep things in sync; though if I could use scp the same way I probably would since I would just have to setup appropriate keys.
12
13 Any how...I setup the rsync daemon with a read-write section. Tested it, and it worked. But I'd really like to have it secured - I don't want anyone to be able to read/write to it. So I tried adding the following:
14
15 [backup]
16 uid = <backup user>
17 gid = <backup group>
18 path = /path/to/backup/repo
19 read only = false
20 list = false
21 auth users = <user>
22 secrets file = /path/to/rsyncd.secrets
23
24 The rsyncd.secrets is simple:
25 <user>:<8 digit password>
26
27 If I don't have the last two lines (e.g. auth user, secrets file) then I can write to it.
28 Otherwise I get an authentication error:
29
30 @ERROR: auth failed on module backup
31 rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]
32
33 I'm uploading via:
34
35 rsync -a --password-file=rsync.passwd someTestFile rsync://<user>@host/backup/extra/path/
36
37 rsync.passwd contains the same <8 digit password>, nothing else.
38
39
40 I've already checked file permissions - the entire directory structure under /path/to/backup/repo is owned by <backup user>:<backup group>.
41
42 What am I doing wrong?
43 Is there a better approach?
44
45 TIA,
46
47 Ben