Sie sind hier : Homepage →  Linux (2) Tape-Backup→  Die (tar) Kommandos→  mbuffer

Also hier die Befehle für die Newcomer, sonst ist es wirklich mühsam:

Für den DAU erklärt : der "mbuffer" Befehl


"mbuffer" is a replacement for "buffer" with additional functionality:

  • display of i/o speed
  • optional use of memory mapped i/o for huge buffers
  • multithreaded instead of sharedmemory ipc
  • multi volume support
  • autoloader support
  • localization


Ausprobieren geht so :

  • tar cf - /usr | mbuffer | tar tf - > /dev/st0
  • tar cf - /usr | mbuffer -t | tar tf - > /dev/st0


AUTHOR: Thomas Maier-Komor - die aktuellen Version ist : 20011008

Es ist also ein erweitertes Pufferprogramm mit Anzeige des Pufferstatus, Datenrate und Puffergrössen über 20 Megabyte. Leider scheint die mit SuSe 9.1 gelieferte rpm-Version nicht zu funktionieren. Neu kompiliert klappt es.

Das "mbuffer" von Suse 9.2 scheint mit einem Band zu funktionieren. Multi Volume (mehrere Bänder) funktioniert noch nicht, (oder wir wissen noch nicht, wie es geht).

Die Optionen für "mbuffer"

Die man- Page sagt:

mbuffer - measuring buffer


mbuffer [options]



  • -i
    use filename as input instead of the standard input (needs to be given for multi volume support)
  • -I
    use network port port as input instead of the standard input. If given a hostname and a port in the form hostname:port the first interface with the IP of hostname will be used.
  • -o
    use filename as output instead of the standard out-put (needs to be given for multi volume support)
  • -O
    write output to hostname:port instead of the stan-dard output
  • -b
    use num blocks for buffer (default 256)
  • -s
    use blocks of size bytes for buffer (default 10240)
  • -m
    use a total of size bytes for buffer (default 2MB)
  • -n
    num volumes in input device (requires use of option -i for input device specification) [currently multi volume support is EXPERIMENTAL]
  • -t use a memory mapped temporaray file as buffer (use with huge buffers)
  • -T
    as -t but use file instead
  • -d use blocksize of device for output (needed for some devices, slows output down)
  • -p
    start writing after the buffer has been filled to num% (default 0 - start at once)
  • -l
    log messages to file instead of standard error output
  • -u
    pause num microseconds after each write - might increase performance on some drives with very low performace (< 1 MB/sec)
  • -a
    used device is an autoloader which takes time seconds to load a new tape
  • -f overwrite output file if it exists already
  • -v
    set verbose level to num. Valid values are 0..5 (0 = none, 1 = errors, 2 = warnings, 4 = informations, 5 = debugging informations). Higher values include lower values messages.
  • -q quiet - do not display the status on the standard error output
  • --help Output help information and exit.
  • --version
    Output version information and exit.





Beispiele :

Using "mbuffer" to do a backup with tar to the default tape device.

Options for this example:

memory mapped temporary file with a size of 10 Megabytes, start after 80% of the buffer have been filled.

tar cf - mydirectory | gzip | mbuffer -t -m 10M -p 80 > /dev/nst0


Using mbuffer with 3 tapes for input and extracting the contents in the current work directory:

mbuffer -n 3 -i $TAPE | gzip -dc | tar xf -

Using mbuffer to write to multiple tape volumes:

tar cf - /usr | mbuffer -o $TAPE

Making a backup via network (EXPERIMENTAL):

tape server: mbuffer -I 8000 -o $TAPE

backup client: tar zcf - /home | mbuffer -O tape-




Zurück zur Startseite ----- © 2009 / 2019 - Copyright by Dipl. Ing. Gert Redlich - Zum Telefon - - - - NEU : Zum Flohmarkt