Gentoo Archives: gentoo-server

From: Anthony Gorecki <anthony@××××××××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] backups/mirroring with rsync
Date: Sat, 30 Oct 2004 23:30:56
Message-Id: 200410301629.19133.anthony@ectrolinux.com
In Reply to: [gentoo-server] backups/mirroring with rsync by Ben Munat
1 Here is the script I use for my nightly backups, network-wide, as an example:
2
3 ---
4 #!/bin/sh
5
6 exec rsync -xPHa --numeric-ids --delete-excluded --exclude=/tmp \
7 --exclude=/var/tmp --exclude=/sys --exclude=/proc --exclude=/dev \
8 --exclude=/var/cache/edb --exclude=/var/db /* \
9 rsync://selene.nvanc.ectrolinux.com/backups-entro
10 ---
11
12 Please note the -x option, which instructs rsync to skip network-based
13 filesystems. This command can only be run as root, and will create an
14 identical copy of a local filesystem on the backup server: files that have no
15 business being backed up or that would only waste disk space needlessly are
16 excluded (/usr/portage should be in the exclude list above, however it's
17 automatically excluded by the -x option on my machines).
18
19 Steam encryption and compression can also be worth-while, depending on the
20 environment. Typically, encrypting the stream is a good idea, which is
21 something I plan to implement on my own systems within the next few weeks. My
22 network can happily throw around large amounts of bandwidth, therefore I
23 choose not to waste extra system resources by compressing the data as it's
24 being transferred.
25
26 On the server end, the applicable portion of rsyncd.conf is as follows:
27
28 ---
29 [backups-entro]
30 path = /var/backups/entro
31 list = false
32 read only = false
33 use chroot = true
34 uid = root
35 gid = root
36 hosts allow = entro.nvanc.ectrolinux.com
37 ---
38
39 I hope that provides some degree of clarification regarding one of the
40 possible ways to implement a backup system.
41
42
43 --
44 Anthony Gorecki
45 Ectro-Linux Foundation

Replies

Subject Author
Re: [gentoo-server] backups/mirroring with rsync Ben Munat <bent@×××××.com>