Suggestions/additions welcome
FAQ Revised: Wednesday 18 June 2003 17:02:26
cd
<topdir>; find . -regex "<expression>"
$path{command} = 'sudo command';
in the config file.
Do this for all commands that will need privilege (find, afio/tar/etc)
Cmnd_Alias BACKUP = /usr/bin/afio, /usr/bin/find
backupuser ALL = NOPASSWD: BACKUP
$path{'dump'} = 'ufsdump';
. You can
use this mechanism to override paths or just change command names.See also these sun docs for an example with some pictures.
Traditional Unix 'dump' behavior only allows levels 0-9; flexbackup removes this limit if you are using any of the non-dump archive formats.
For those people coming from other platforms that are not used to
dump-style numeric levels, the latest versions of flexbackup have added
-full
, -differential
, -incremental
that get translated into appropriate dump-style level numbers.
Definitions:
These are simply aliased to numeric levels: full = 0, differential = 1, and
incremental = (latest backup + 1)
flexbackup -fs /dir1 -norewind
flexbackup -fs /dir2 -norewind
flexbackup -fs /dir3 -norewind
$staticfiles
to true in the config file. Archives will
then have names such as "etc.3.dump.gz" rather than something like
"home.0.200301212305.afio-bz2". There is a similar parameter for the log
files, by the way.flexbackup -test-tape-drive
. It writes a couple
small files to the tape, then reads & diffs them. This will flush out any
problems with parameters like blocking, filemarks, and padding; or issues
with the tape drive or driver itself.
If it fails, try these one at a time:
$buffer='false'
) until you can get things working without it.
$blksize
) in the configuration file. The default is 10k, but some tape drives like 32k or 64k much better.
$pad_blocks
to false
$mt_var_blocksize
to false
$indexes
set to false
If you are using an IDE tape drive under Linux, and are still having trouble, you might also try the 'ide-scsi' layer with the 'st' module, and treating the thing like a SCSI tape - I've had more success that way.
You can also just try writing/reading stuff straight from the drive with
tar and dd (to factor flexbackup out of the loop), although that's what the
-test-tape-drive
switch tries to do. If you can get that working,
but flexbackup still seems to malfunction, let us know. Try things like:
(The example below uses afio to test, tar/cpio/others will be different)
# Backup two dirs mt -f /dev/tape setblk 32768 mt -f /dev/tape rewind mt -f /dev/tape erase find /dir1 -print | afio -o -z -v -b 32k - | dd ibs=32k obs=32k of=/dev/tape find /dir2 -print | afio -o -z -v -b 32k - | dd ibs=32k obs=32k of=/dev/tape # List mt -f /dev/tape rewind dd ibs=32k obs=32k if=/dev/tape | afio -t -z -v -b 32k - dd ibs=32k obs=32k if=/dev/tape | afio -t -z -v -b 32k -
If you are using ssh and are having a problem with it asking for a
password, then you don't have a passphrase-less authorized key set up, your
RSAAuthentication parameters are incorrect, or you have some other
public/private key problem. Section 7.2.2 of the ssh FAQ might
help:
http://www.onsight.com/faq/ssh/ssh-faq.html
In a nutshell the value of your ~/.ssh/identity.pub
needs to
be present in your ~/.ssh/authorized_keys
file for RSA
authentication to work. For root accounts you might also need to
put
PermitRootLogin yes
in your sshd_config
file, as root is treated with more care than normal user accounts. Note:
you might choose without-password or forced-commands-only instead of yes
for more security. See your ssh(1) and sshd(1) man pages.
If you do not want to use passphrase-less ssh keys with root logins, See
the section on use with "sudo". (Or else sit at the terminal and type
passwords during the backups if you *really* want to...)
$buffer_megs
to a lower value and try again. I usually
run with it set somewhere between 5-20MB.
On FreeBSD, SysV shared memory can run low using the GENERIC kernel at
its default value (especially if you are running something like GNOME). You
can modify your kernel file and change the line
options SHMMAXPGS=2048
To something really big. You can also change this dynamically at startup by
putting
kern.ipc.shmmax={large integer}
in /etc/sysctl.conf. Other BSD's will have very similar mechanisms.
dd if=/dev/tapedevice bs=10k | gzip -dc | tar xvf -
$indexes =
'false';
in the config file, and just use written labels on the
tapes...FAQ compilation thanks to makefaq