xorrisofs: ExIncBckAcc
6.6 Incremental backup with accumulated trees
=============================================
Solaris does not offer the option to mount older sessions. In order to
keep them accessible, one may map all files to a file tree under a
session directory and accumulate those directories from session to
session. The -root tree is cloned from the -old-root tree before it
gets compared with the appropriate trees on disk.
This demands to know the previously used session directory name.
With the first session:
$ xorrisofs -root /session1 \
-o - --for_backup -m '*.o' -m '*.swp' \
-V PROJ_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" -graft-points \
/projects=/home/thomas/projects \
/personal_mail=/home/thomas/personal_mail \
| xorriso -as cdrecord dev=/dev/sr0 -v blank=as_needed \
-multi -waiti -eject -
With the second session, option -old-root refers to /session1 and the
new -root is /session2.
Do not let xorriso -as cdrecord load the medium, but rather do this
manually or by a program that reads from /dev/sr0.
$ dd if=/dev/sr0 count=1 >/dev/null 2>&1
$ msinfo=$(xorriso -as cdrecord dev=/dev/sr0 -msinfo)
$ load_opts=
$ test -n "$msinfo" && load_opts="-M /dev/sr0 -C $msinfo"
$ xorrisofs $load_opts -root /session2 -old-root /session1 \
-o - --for_backup -m '*.o' -m '*.swp' \
-V PROJ_MAIL_"$(date '+%Y_%m_%d_%H%M%S')" -graft-points \
/projects=/home/thomas/projects \
/personal_mail=/home/thomas/personal_mail \
| xorriso -as cdrecord dev=/dev/sr0 -v -multi -waiti -eject -
With the third session, option -old-root refers to /session2. The
new -root is /session3. And so on.