Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #202108

Re: Archiving content of a directory on a DVD-R.

From "Thomas Schmitt" <scdbackup@gmx.net>
Newsgroups linux.debian.user
Subject Re: Archiving content of a directory on a DVD-R.
Date 2018-11-04 19:00 +0100
Message-ID <wQuQO-1GU-7@gated-at.bofh.it> (permalink)
References <wQsP0-xe-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

peter@easthope.ca wrote:
>   printf "Insert blank DVD-R."; read t ;
>   tar -vcpzf - * | xorriso -indev /dev/sr0 -add -- -commit ;

Writing the tar stream to DVD-R is a classical use case of cdrecord or wodim.
So:

  tar -vcpzf - * | xorriso -as cdrecord -v dev=/dev/sr0 -eject fs=16m -

This will not create a filesystem around the tar archive. So the planned
xorriso runs with command -indev would then go on strike:

>   xorriso -indev /dev/sr0 -du / -- -toc 2>&1 ;
>   xorriso -indev /dev/sr0 -eject ;

Retrieval is then just a matter of tar and the Linux sr driver:

  tar xvzf /dev/sr0

Of course, this will not give you quick access to single files and even
getting a list of content will last several minutes, if the tar archive
fills most of the DVD:

  tar tvzf /dev/sr0

-------------------------------------------------------------------------

If you want to make use of xorriso's capability to create a mountable ISO
filesystem with a copy of your directory, then you do not need tar.

  xorriso -for_backup -outdev /dev/sr0 -map . / \
          -close on -commit \
          -toc -check_md5 failure -- \
          -eject all

This run acquires /dev/sr0 by command "-outdev". Command "-map . /" maps
the directory tree of the current rd disk directory to the /-directory tree
of the ISO 9660 filesystem on the DVD-R. 
By command "-for_backup" it will record MD5 checksums for the whole
filesystem and for each single data files in the filesystem.

Command "-close on" causes the DVD-R to become unwritable after the burn
run is completed. (If you omit it then the DVD stays appendable for more
sessions.) Command "-commit" performs the burn run.

Command "-toc" will afterwards print an overview of the result after the
new ISO filesystem was assesd by xorriso.
Command "-check_md5 failure --" reads the freshly written blocks and compare
their MD5 with the recorded checksum in the ISO. In case of mismatch it
will throw an event of severity "failure", which will abort the xorriso run.
If not aborted, the drive will be told by "-eject all" to eject the tray.
(It needs to have a motor for that, of course.)

Retrieval:

If not your friendly desktop mounts the DVD automatically on insertion:

  mount /dev/sr0 /mnt/iso

Then use normal file tools like "ls", "cp", or a desktop file manager to
copy the files to hard disk or just to let your application read them from
the mounted directory directly.

Verifying of the medium after a while on the shelf:

  xorriso -for_backup -indev /dev/sr0 -check_media --


Have a nice day :)

Thomas

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-04 16:50 +0100
  Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-04 19:00 +0100
    Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-07 12:30 +0100
      Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-07 13:10 +0100
        Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-07 15:40 +0100
  Re: Archiving content of a directory on a DVD-R. David Christensen <dpchrist@holgerdanske.com> - 2018-11-05 00:20 +0100
  Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-05 15:10 +0100
    Re: Archiving content of a directory on a DVD-R. <tomas@tuxteam.de> - 2018-11-05 15:40 +0100
  Re : Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-07 23:40 +0100
    Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2018-11-08 09:00 +0100
  Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-08 00:00 +0100
    pushd/podp (was Re: Archiving content of a directory on a DVD-R.) Jonathan Dowland <jmtd@debian.org> - 2018-11-08 10:50 +0100
      Re: pushd/popd peter@easthope.ca - 2018-11-09 16:10 +0100
        Re: pushd/popd Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-09 17:30 +0100
          Re: pushd/popd Jonathan Dowland <jmtd@debian.org> - 2018-11-09 21:50 +0100
        Re: pushd/popd Jonathan Dowland <jmtd@debian.org> - 2018-11-09 17:30 +0100
        Re: pushd/popd peter@easthope.ca - 2018-11-10 19:30 +0100
          Re: pushd/popd David Wright <deblis@lionunicorn.co.uk> - 2018-11-11 07:00 +0100
            Re: pushd/popd Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-12 14:50 +0100
              Re: pushd/popd David Wright <deblis@lionunicorn.co.uk> - 2018-11-12 21:40 +0100
    Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-08 14:20 +0100
      Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-12 23:00 +0100
        Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-12 23:20 +0100
          Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-13 03:40 +0100
            Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-13 14:20 +0100
              Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2018-11-13 16:00 +0100
              Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-14 11:00 +0100
                Re: Archiving content of a directory on a DVD-R. Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-14 14:40 +0100
                Re: Archiving content of a directory on a DVD-R. Jonathan Dowland <jmtd@debian.org> - 2018-11-14 16:40 +0100

csiph-web