Quick start howto for divish on Debian

  1. Prep
    1. Here, there is one backup server and two client servers that need to be backed up
    2. Make sure root user on backup server can ssh to mybox01.mydomain.net and mybox02.mydomain.net without password
      1. Later, much later, see online for better, more secure ways
    3. install dirvish and rsync on server, rsync on clients
      1. apt-get install dirvish
      2. apt-get install rsync
  2. Clients
    1. The below are just example directories, use your own, the ones you want backed up
    2. mkdir -p /data/backups/
    3. mkdir -p /data/backups/etc
    4. mkdir -p /data/backups/var/log
    5. rsync -av /etc/ /data/backups/etc/
    6. rsync -av /opt/ /data/backups/opt/
    7. Make a cron job to do the rsyncs above nightly
  3. Server
    1. mkdir -p /backup/dirvish/mybox01/dirvish
    2. mkdir -p /backup/dirvish/mybox02/dirvish
    3. vi /backup/dirvish/mybox01/dirvish/default.conf
      1. get contents below
    4. vi /backup/dirvish/mybox02/dirvish/default.conf
      1. get contents below
    5. dirvish --vault mybox01 --init
    6. dirvish --vault mybox02 --init
  4. Verify
    1. Backed up files should now be under /backups/dirvish on backup server
      1. tree /backup/ -d -L 3
      2. find /backup/dirvish -ls | less
  5. Tell dirvish to do nightly pull
    1. vi  /etc/dirvish/master.conf.mybackup
      1. get contents below
  6. Tomorrow, verify the pull worked, and next week too
  7. Exclusion and expire options
    1. Research options one can add to master.conf.mybackup
Server files

/etc/dirvish/master.conf

bank:
    /backup/dirvish

Exclude:
    lost+found/


/etc/dirvish/master.conf.mybackup

Runall:
    mybox01
    mybox02

/backup/dirvish/mybox01/dirvish/default.conf

client: mybox01.mydomain.net
tree: /data/backups

xdev: true
index: gzip


/backup/dirvish/mybox02/dirvish/default.conf

client: mybox02.mydomain.net
tree: /data/backups

xdev: true
index: gzip



Comments

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny