[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xorriso, the right way to do incremental backup



Hi,

Zhang Weiwu reports success with my answer to his question from
Sun, 11 Dec 2011 18:02:44 +0800.
He also pointed me to the fact that i forgot to send that reply to
the list.

So for the records:
-----------------------------------------------------------------------
My answer of Sun Dec 11 12:56:33 CET 2011:
-----------------------------------------------------------------------
Zhang_Weiwu <zhangweiwu@realss.com> wrote:
> I tried to follow the manual.
> [...] wrote 2GB data to the disk
> [...] Hoping to see only a few bytes written to the same disc

The example from man xorriso that matches best your expectations is
"Incremental backup of a few directory trees".

There will be written more than only the changed file contents.
The new session will also get a complete new tree of directory
entries. Expect 500 to 1000 bytes per file.

Further, depending on the medium type, there will be a gap of wasted
blocks between the end of the previous session, and the start of the
new one. DVD-R and DVD-RW waste most. DVD+R waste less.
DVD+RW, formatted DVD-RW and Blu-ray waste least.


> $ xorriso -outdev /dev/sr0 -speed 1 -blank as_needed -as mkisofs
> -exclude-list .exclude.lst -print-size .

Omitting the check commands of the mentioned example, that would be:

Before the first time:
  $ xorriso -dev /dev/sr0 -blank as_needed

Repeatedly:
  $ xorriso \
    -for_backup -disk_dev_ino on \
    -dev /dev/sr0 \
    -not_list .exclude.lst \
    -update_r . / 

Do not change the sequence of these xorriso options. E.g. -for_backup
and -disk_dev_ino need to be given before the session gets loaded by -dev.
On the other hand, -update_r will throw error if you do it before a
drive was chosen by -dev, and it will not obey -not_list if it is not
defined already.
-disk_dev_ino depends on stable device numbers of the filesystem.
Change "on" to "ino_only" if your system hands out varying numbers with
each boot.

You may get a preview of the size by appending to above xorriso commands:
     -print_size
and you may abort the run before actually burning begins by:
     -rollback_end

You may also practice with a disk file as target:
     -dev /my_fat_disk/my_pseudo_drive_file
If it does not exist yet, then it is regarded as blank medium and
will get created by the write run.


Have a nice day :)

Thomas


Reply to: