Configuring RDW-backup services

Introduction

This page describes how Alexis Huxley installed and configures RDW-based backup services.

Configuring the server

  1. On the mail server:
    echo "backup: root" >> /etc/aliases
    newaliases
  2. On the backup server, as root, run:
    apt-get install rdw
    service rdw stop
    rm -f /var/tmp/{te,rdw}*
    echo "DAEMON=/home/alexis/dev/def/rdw/bin/rdw" >  /etc/default/rdw
    echo "DAEMON_ARGS=\"--server -v\""             >> /etc/default/rdw
    #  Next two lines only needed if daemon is on automounted filesystem
    perl -pi -e 's/(Required.*)/$1 autofs/' /etc/init.d/rdw
    update-rc.d rdw defaults
    cd ~backup
    {
        echo 'PATH=/home/alexis/dev/def/rdw/bin:$PATH'
        echo '#  Fix for SOFT-86'
        echo 'export EDITOR=vi'
    } > .profile
    mkdir .ssh
    touch .bash_history .viminfo .profile
    chown backup:backup .ssh .bash_history .viminfo .profile
    #  Convenient; may say "no changes" to stderr
    usermod --shell /bin/bash backup 2> /dev/null
  3. On the backup server, as the backup user, run:
    su - backup
    ssh-keygen -q -N '' -f ~/.ssh/id_rsa_rdw
  4. Define a new backup set by running:
    rdw -d 10 --add-set nightly-snapshot "5 0 * * *" "5 0 * * *" \
        "61 * * * *" 30G 50% 28d 28 rdiff_backup
    mkdir /vol/backup/vtape-003
    rdw --label-medium "vtape-003" /vol/backup/vtape-003
    rdw --add-medium "vtape-003" /vol/backup/vtape-003 nightly-snapshot true
  5. Add removable hard disk media by running:
    #  Not documented yet
  6. Ensure that disks which will provide virtual tapes are mounted with thexattr_user option. (Backups using the ‘rsync’ method will call ‘rsync ... --fake-root‘ and that requires the xattr_user mount option.)
  7. Add the following to /etc/postfix/virtual:
    backup <my-public-email-address-as-all-mail-relayed-via-company-servers>

    and run:

    postmap /etc/postfix/virtual

Adding a new client

  1. On the server run:
    rdw --add-client torchio
    rdw --add-dle nightly torchio torchio /tmp

    (Follow the prompts from the first command.)

  2. Test by running:
    rdw -v --check nightly
    rdw -v --backup nightly

See also