Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #206036 > unrolled thread
| Started by | peter@easthope.ca |
|---|---|
| First post | 2019-03-06 16:20 +0100 |
| Last post | 2019-03-06 17:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.debian.user
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Archiving content of a directory on a DVD-R. peter@easthope.ca - 2019-03-06 16:20 +0100
Re: Archiving content of a directory on a DVD-R. "Thomas Schmitt" <scdbackup@gmx.net> - 2019-03-06 17:30 +0100
| From | peter@easthope.ca |
|---|---|
| Date | 2019-03-06 16:20 +0100 |
| Subject | Re: Archiving content of a directory on a DVD-R. |
| Message-ID | <xyGuR-64c-7@gated-at.bofh.it> |
* From: "Thomas Schmitt" scdbackup@gmx.net * Date: Sun, 04 Nov 2018 18:48:45 +0100 > 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 ... Thanks Thomas. That's what I ended up using. Two shell scripts are in http://easthope.ca/DebianPage.html under heading Backups. Backup() is used interactively to protect against failure of the SD card. FilesToDVD() makes archival records allowing convenient access to old copies of individual files. Typically, Backup() executes in less than a minute. Good for interactive use when working. An example run of FilesToDVD() follows. Thanks again, ... Peter E. peter@dalton:~$ time FilesToDVD Insert blank DVD-R. xorriso 1.4.6 : RockRidge filesystem manipulator, libburnia project. Drive current: -outdev '/dev/sr0' Media current: DVD-R sequential recording Media status : is blank Media summary: 0 sessions, 0 data blocks, 0 data, 4489m free xorriso : UPDATE : 2668 files added in 1 seconds Added to ISO image: directory '/'='/home/peter/MY0.Bak' xorriso : UPDATE : Thank you for being patient. Working since 0 seconds. xorriso : UPDATE : Thank you for being patient. Working since 1 seconds. xorriso : UPDATE : Thank you for being patient. Working since 2 seconds. xorriso : UPDATE : Writing: 16s 0.0% fifo 100% buf 0% 0.0xD ... xorriso : UPDATE : Writing: 380133s 100.0% fifo 0% buf 100% 0.0xD ISO image produced: 379983 sectors Written to medium : 380133 sectors at LBA 0 Writing to '/dev/sr0' completed successfully. xorriso : NOTE : Re-assessing -outdev '/dev/sr0' ... xorriso : UPDATE : 742.1m content bytes read in 112 seconds = 5.0xD Ok, session data match recorded md5. real 5m12.980s user 0m10.536s sys 0m6.148s -- Message composed and transmitted by software designed to avoid the complication and vulnerability of antivirus software. 123456789 123456789 123456789 123456789 123456789 123456789 123456789 Pender Is., BC: +1 604 670 0140 Washington State: +1 360 639 0202 http://easthope.ca/Peter.html Bcc: peter at easthope. ca
[toc] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-03-06 17:30 +0100 |
| Message-ID | <xyHAB-6Hi-3@gated-at.bofh.it> |
| In reply to | #206036 |
Hi,
peter@easthope.ca wrote:
> Media current: DVD-R sequential recording
> [...]
> xorriso : UPDATE : 742.1m content bytes read in 112 seconds = 5.0xD
It seems that next the joy of incremental backups could be explored.
> http://easthope.ca/DebianPage.html
First precondition would be to give up xorriso command
-close on
to keep the DVD-R writable on its yet unused area.
Next replace -outdev by -dev and -map by -update_r.
I.e.:
xorriso -for_backup -dev /dev/sr0 \
-update_r . / \
-commit \
-toc -check_md5 failure -- \
-eject all
Now you can write to the DVD-R until it is full. Each run will produce a
complete directory tree of the current state. Data file content will
only be written if the file is new or its content changed since the
previous backup session (if there is such a session on DVD already).
If not many files changed, the add-on session
When you mount the DVD on GNU/Linux, the youngest session will be used by
default. Older sessions can be mounted by mount(8) option "-o sbsector="
using the numbers told by column "sbsector" of xorriso command -toc:
$ sudo mount -o sbsector=567890 /dev/sr0 /mnt/iso
Each session shows the complete directory state as it was at the time
when it was written to DVD.
When the DVD-R has not enough room for the upcomming session, xorriso will
fail without altering the DVD-R content. In this case, just insert a new
blank DVD-R to write a new first session.
------------------------------------------------------------------------
The update decision is based on the timestamps and recorded MD5s on DVD.
For the comparison, the MD5s of the files in /home/peter/MY0.Bak have
to be computed by reading the full file content. If the storage device
is slow or your CPU runs hot, then consider to bet on device numbers and
inode numbers:
If the device number of the storage device is persistent over unmounting
or reboot, then insert
-disk_dev_ino on
between -for_backup and -outdev.
If the device number changes, but the inode numbers are persistent, then
use
-disk_dev_ino ino_only
Whether those numbers are persistent can be inquired by printing them
with shell command "stat" before and after reboot or re-mounting:
$ stat --format="device=%d inode=%i" /.../some_file
device=2051 inode=3540166
(Device number changes are a matter of the operating system's bus
management, inode number changes are mostly a matter of the filesystem's
type. extN should be safe at least with inode numbers.)
Have a nice day :)
Thomas
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web