Toon posts:

tar direct naar cdrecord

Pagina: 1
Acties:

Verwijderd

Topicstarter
ik wil als backup een script laten draaien die een tgz file direct naar de cdrecord stuurt. dus niet eerst een tar file aan maken en dan branden.

nu doe ik dit: dit word dus niet ingepakt.
mkisofs -r -J --quiet /home | buffer -s 512k -m 2m | cdrecord speed=8 -data -

maar met tar moet je perse een file opgeven als doel
iemand een idee om dit als een tgz te backupen zonder dat het bestand home.tgz hoeft te bestaan ?

  • JaQ
  • Registratie: Juni 2001
  • Laatst online: 06-02 18:40

JaQ

Verwijderd schreef op woensdag 17 mei 2006 @ 22:15:
maar met tar moet je perse een file opgeven als doel
is dat zo? Probeer eens tar zonder de -f switch ;) Dit werkt bijvoorbeeld prima (en gebruik ik om via netwerk te backupen naar een andere machine met behoud van symbolic links):

code:
1
tar -czp * | ssh user@host "tar -xzp "

Egoist: A person of low taste, more interested in themselves than in me


  • laurencevde
  • Registratie: November 2001
  • Laatst online: 02-10-2025
code:
1
tar -cj /home/ |mkisofs -r -J --quiet -stream-media-size # | buffer -s 512k -m 2m | cdrecord speed=8 -data -
tar stuurt standaard zijn in/output naar stdin/out.

en uit de mkisofs manpage:
-stream-media-size #
Select streaming operation and set the media size to # sectors. This allows you to
pipe the output of the tar program into mkisofs and to create a iso9660 filesystem
without the need of an intermediate tar archive file. If this option has been
specified, mkisofs reads from stdin and creates a file with the name STREAM.IMG.
The maximum size of the file (with padding) is 200 sectors less than the specified
media size. If -no-pad has been specified, the file size is 50 sectors less than
the specified media size. If the file is smaller, then mkisofs will write padding.
This may take a while.

The option -stream-media-size creates simple iso9660 filesystems only and may not
used together with multi-session or hybrid filesystem options.

Have a taste of freedom. It is sometimes a bitter pill. To me though, this is the sweetness of the GPL