tresor

Section: Backup (8)
Updated: 1.01
Index
 

NAME

tresor - full backup and fast restores for bytepositioning tape drives (this option is available on some Tandberg and Wangtek streamers and some SCSI-2 tape drives)  

SYNTAX

tresor [-v] [-c configfile] [-b volume|-i|-h]
tresor --version|--help|-?  

DESCRIPTION

Tresor is a backup and restore program.

Tresor and all files included in this package are licensed and protected under the terms and conditions of the GNU General Public License Version 2.

Tresor comes with absolutely no warranty.

Features

- flexible configuration
- support for languagefiles (en & de provided)
- "database" (one bz2-file/volume) for multiple volumes
- fast restores due to direct seeks
- additional grafical user interface using Xdialog
- tape operations based on dd, afio, mt
- tape identification using an own header:


TRESOR_FIRSTWRITTEN='22.01.03 15:48:36'
TRESOR_LASTWRITTEN='23.01.03 14:20:37'
TRESOR_NUMWRITES=4
TRESOR_PROGRAM=tresor
TRESOR_UNAME='Linux buran 2.4.20 #1 SMP...'
TRESOR_VERSION=0.98
TRESOR_VOLUME=monday_buran

 

RESTORE HINTS

If you enter "/root" as searchstring for restore you may receive this output (shortened here for manpage):
14482 ... 256 0755 root /root
14564 ... 5802 0600 root /root/.bash_history
20462 ... 400 0600 root /root/.bashrc
20952 ... 410 0644 root /root/.bashrc.pre_fcopy
21462 ... 202 0644 root /root/.profil/roote
21755 ... 4424 0600 root /root/.viminfo
26270 ... 2339 0644 root /root/tresor.8
28700 ... 17152 0644 root /root/tresor_0.9.deb

(byteposition, date, time, size, file access perms, owner, path-/filename)

If you quit your editor without any changes, tresor will use the file- and dirnames as patternfile for afio -w (see man afio for further details).

During the restore operation tresor will seek to byte position 14482 (first line of the filelist) and start afio with -w and your edited patternfile.

Alternatively you can change the filelist to:

14482 ... 256 0755 root /root/*

This will produce a smaller patternfile. Be sure to use filelists which result in reasonable patterns for afio.

If your filelist has big gaps in the bytepositions it could be better to restore in two steps. Tresor uses only the first line for positioning.

Afio scans the tape from the respective startposition till end to find files and folders for restore. If you are sure, you have restored the corresponding data, you can abort the process.

!!! If you restore your kernel make sure you run lilo !!!  

TAPELAYOUT

+------------------+--------------------+----------------+
|Part #1           |Part #2             |Part #3         |
|Header            |Backup              |compressed Index|
|dd ibs=2048 cou...|afio -ovBA -b 10k...|afio -ovBA -b...|
+------------------+--------------------+----------------+
|TRESOR_FIRSTWRI...|Full backup of files|A logfile with  |
|TRESOR_LASTWRIT...|excl. the configured|all attributes  |
|TRESOR_NUMWRITES=5|directories in      |& bytepositions |
|TRESOR_PROGRAM=...|/etc/tresor/XX.param|(from afio) gets|
|TRESOR_UNAME='L...|(where XX is default|compressed and  |
|TRESOR_VERSION=...|or set using -c when|written to tape.|
|TRESOR_VOLUME=0...|starting tresor).   |                |
+------------------+--------------------+----------------+
 

APPLICATION FLOW

- perform before backup operation ($BEFORECMD)
- turn compression on ($COMPRESSIONCMD)
- rewind the tape ($REWINDCMD)
- create filelist ($FINDCMD)
- read header (for log and to determine # of overwrites)
- rewind the tape ($REWINDCMD)
- write the new header (dd)
- archive all files (afio)
- create indexfile with all infos (incl. bytepositions)
- compress the indexfile (bzip2)
- write indexfile to tape (afio)
- rewind the tape ($REWINDCMD)
- perform after backup operation ($AFTERCMD)
- perform $ENDOKCMD or $ENDERRCMD (does not log in

  $TEMP/summary - used e.g. for mail)  

OPTIONS

-b volume1
Backup to volume "volume1"
-c 2ndconfig
Use "2ndconfig.param" and -".exclude" instead of default.*
-i
Import a volume from tape (store the indexfile in /var/lib/tresor).
-h
Output header from tape and exit.
--version
Output version information and exit.
--help|-?
Output help information and exit.
-v
be verbose
 

FILES

# default configuration files
/etc/tresor/default.param (default configuration file)
/etc/tresor/default.exclude (default exclude list)

# alternative additional configuration files
/etc/tresor/<config>.param
/etc/tresor/<config>.exclude

# default language files
/etc/tresor/lang.en (all messages in english)
/etc/tresor/lang.de (german messages - set LANGMSG="de" in *.param)

# database/logfiles of all volumes
/var/lib/tresor/*  

ENVIRONMENT VARIABLES

DISPLAY
Must be set for restore operations or if gui is preferred.
 

EXAMPLES

To perform a backup of volume "Monday" to the configured tape device (see /etc/tresor/default.param) type:

tresor -b Monday # or
tresor -b `date +%A`

If you want to backup from monday to friday using your modified /etc/tresor/batch.param and /etc/tresor/batch.exclude you can add the following entry to your crontab:

00 21 * * 1-5 /usr/sbin/tresor -c batch -b `date +%A` 2>/dev/null

Tresor is quiet if you don't use "-v" but error messages are written to &2. To avoid getting simple emails from your cronjob you can redirect 2>/dev/null and uncomment the ENDOKCMD and ENDERRCMD in your /etc/tresor/batch.param to get the summaryfile with all comments and errormessages of your backup.

Alternativly you can start the interactive gui (when DISPLAY is set) with:

tresor
 

FAQ

Q: Does tresor handle more than one tape for a backup
A: No - buy bigger tapes.

Q: I have got a new or better translation - do you wan't it?
A: Yes, of course - send it to arlt@universa.de (man & lang.XX).

Q: Does my tape drive support bytepositioning?
A: Try it - man mt (parameter seek) will help. Alternatively there is an option "Other->Test tapedrive" in tresor.

Q: I have got a compatibility list - do you add it to your manpage
A: Yes - maybe... i don't know...

Q: I can't start it, even if i make "su -" (errormessage: "Unable to access DISPLAY ->man tresor ->FAQ")
A: 1. DISPLAY must be set. 2. root is not allowed to start programs on your xserver?! Try xhost local:root (man xhost) or ssh root@localhost with activated X11 forwarding (man ssh, man sshd) instead.

Q: I tried it with s-bit on tresor - this does not work, too!
A: Your real userid won't change, even if you use s-bit on tresor. Solution: See last Question.  

AUTHORS

Michael Arlt (arlt@universa.de)
Gerhard Huber (huber@universa.de)
uniVersa Versicherung  

SEE ALSO

afio(1) dd(1) mt(1)


 

Index

NAME
SYNTAX
DESCRIPTION
RESTORE HINTS
TAPELAYOUT
APPLICATION FLOW
OPTIONS
FILES
ENVIRONMENT VARIABLES
EXAMPLES
FAQ
AUTHORS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 20:41:47 GMT, September 17, 2003