Koozali.org: home of the SME Server

Selective Backup

Offline compsos

  • *
  • 472
  • +0/-0
Selective Backup
« on: July 28, 2004, 03:59:09 AM »
Hi

Has anyone found a way to use flexbackup but exclude particular ibays?

We have some static data that does not need repeative backing up. I have tried the exclude_expr in the flexbackup.conf but I believe dump ignores this.

SMEServer 6.01.1
Tape SCSI tape (all tests pass)

Gordon
Regards

Gordon............

Offline loek

  • *
  • 12
  • +0/-0
Selective Backup
« Reply #1 on: August 23, 2004, 11:22:26 PM »
Hi Gordon,

Since SME 6, flexbackup is able to exclude files from the (tape)backup since it is no longer using the dump-type backup. All this is explained in some HowTo's but it also took me quite some trial and error to get it working, so here's my version:

To exclude certain files, copy
/etc/e-smith/templates/etc/flexbackup.conf/10Exclude_expr00
to
/etc/e-smith/templates-custom/etc/flexbackup.conf/10Exclude_expr00

edit the file and add lines like:
Code: [Select]
$exclude_expr[2] = '.*PQI$';
using regular expressions. (This one excludes all files ending with PQI, images of harddrives which I don't want to backup on tape)

To exclude certain directories, use for instance:
Code: [Select]
$exclude_expr[3] = '.*/excluded-dir/.*';

Or to exclude an ibay, do e.g.:
Code: [Select]
$exclude_expr[4] = '.*/files/ibays/excluded-ibay/.*';
to make sure you don't exclude other directories with the same name. Increase the index no. for every exclude entry.

Beware, regular expressions are NOT the same as wildcards. For more info on regular expression, see e.g. http://sitescooper.org/tao_regexps.html or many other sites.

After saving this file, type
Code: [Select]
/sbin/e-smith/expand-template /etc/flexbackup.conf
on the command line to create a new /etc/flexbackup.conf from the template, and then run your backup or wait till the scheduled backup starts.

To test your settings, modify /etc/flexbackup.conf and set the line $compress = 'gzip' to $compress = 'false' (due to a tiny bug in this version of flexbackup) and type e.g.
Code: [Select]
flexbackup -set all -type filelist >/root/backupfilelist
When this finishes no backup has been made, but the file /root/backupfilelist should contain a listing of every file that should have been backed up, so you can check whether the exclude options work.

More info on flexbackup: http://www.flexbackup.org
Good luck,
Loek

Offline compsos

  • *
  • 472
  • +0/-0
Selective Backup
« Reply #2 on: August 28, 2004, 08:36:45 AM »
Loek
Thank you. I was chasing it through the wrong fragement.
Regards

Gordon............