Dkopp
user guide
introduction
concepts
first tryout (1-page primer for the
RTFM inhibited)
file menu
backup menu
verify menu
report menu
restore menu
DVD/BD menu
help menu
toolbar buttons
editing backup jobs
script files
large backup jobs
technical notes
Dkopp Introduction
Dkopp is a Linux
utility program for copying disk files to recordable DVD or Blue-ray (BD) media.
This is a free open source program licensed under the GNU General
Public License v.3.
Three kinds of
backup are available: full,
incremental, and accumulate. A full backup copies all specified files
and leaves no other files on the DVD/BD. An incremental backup copies
only
new or modified files to a prior dkopp DVD/BD, bringing it up to date.
This is normally much faster than a full backup. Unmatched files on the
DVD/BD are also deleted, so that the DVD/BD is left exacty matching the
disk.
An accumulate backup is like an incremental backup, but unmatched files
are not deleted.
You select files
to be copied using a GUI. You
can navigate through the file system and select files or directories to
include or exclude at any level in the hierarchy. These choices can be
saved in a job file to automate recurring backups. If files are
added or deleted within an included or excluded directory, the next
dkopp run will include these changes automatically. You need to revise
the backup job only if you make new exceptions.
DVD/BDs can be
verified
three ways: full, incremental, and thorough. A full verify reads the
entire DVD/BD and reports any files having read errors. An incremental
verify reads only those files that have been newly written by a
preceding incremental backup. This is usually much faster while still
offering
a high level of security. A thorough verify reads every file on the DVD/BD
and makes a bytewise comparison with the corresponding disk files. This
provides an additional assurance that hardware and software are working
correctly.
You can report
all files in a backup job, or all files
on a DVD/BD. You can search for specific files using wildcards. You can
compare a DVD/BD with the corresponding backup job, listing all
differences: files that have been created, deleted, or modified since
the DVD/BD copy was made. This comparison can be done at three levels: a
detailed list of files, a directory level summary, or a job level
summary.
For disaster
recovery or file transfer, dkopp has a file
restore capability. You can select and restore DVD/BD files to their
original directories or anywhere else.
Incremental backups
update the same DVD/BD from a prior full backup. This simplifies both
backup and restore: you do not need to track full and
incremental backup DVD/BDs, and you do not need to restore files from
multiple DVD/BDs in correct sequence.
Searchable
log files are generated with time/date, DVD/BD label, and files copied.
You can search the log to find all DVD/BDs with copies of a desired file,
using wildcards to simplify the search (e.g. find
*/joeblow/*/asdf* ).
A script file
can be used to automate backups or run dkopp from a shell script.
Incremental
backup and verify can take less than a minute if the
updated files are within 30 megabytes or so. For larger jobs, the DVD/BD
speed determines the time required. With 4x DVD media, backup + verify runs
about 150 megabytes per minute.
Dkopp is a graphical front end for the command-line programs growisofs and genisoimage.
Dkopp
Concepts
The files in a
backup job are specified with include and exclude statements. These
have filespecs with optional wildcards placed almost anywhere. Examples:
include
/home/*
# add user files
include
/root/*
# add root files
include /shared/*/documents/* # add shared document
files
exclude
*/mp3/*
# exclude files in mp3 directories
exclude
*/.Trash/*
# exclude trash files
The first include adds all files owned by
users in their home directories and sub-directories. The second include
adds all files owned by root. The third include adds all files under
the /shared top directory that also have an intermediate
directory named /documents. The two exclude statements exclude files
within /.Trash and /mp3 directories at any
level.
GUI interface: The above statements are normally
generated using a standard Gnome file selection dialog. The process is
documented in the section on editing backup jobs.
file
selection logic:
loop:
get next control statement, if EOF quit
if include: add all matching files to backup file set
if exclude: remove all matching files from backup file set
loop-end
Note
that excludes are effective only against prior includes. They have no
effect on following includes, which are processed afterwards. See the
section on editing backup jobs.
Restriction:
include statements must
include at least the first directory name (top-level) without wildcards
(the GUI file-chooser does this automatically).
limitations:
+ max. 200,000 files in a
backup job (compile time constant)
+ must run
as root user to copy protected files (or mount DVD/BDs on some systems)
+ supports DVD/BD media only (not CD media)
+ not
useful for disk imaging (operating system backup)
After
installing dkopp, please perform the first tryout exercise (next page).
This may be all you need at first (if you are like most people and RTFM
is a drag). You can enhance your security and ultimately save time if
you read this whole document.
License and Warranty
Dkopp is a free
program licensed under the GNU General Public License,
Version 3 (from the Free Software Foundation). Dkopp is not warranted
for any purpose whatsoever, but if you find a bug, I will try to fix it.
Origin and Contact
Dkopp originates
from the author's web site at:
http://kornelix.squarespace.com/dkopp
Other web sites
may offer it for download. Modifications could have been made.
If you have
questions, suggestions or a bug to report:
http://kornelix.squarespace.com/contact
Dkopp first tryout
The
following short exercise will check that dkopp functions correctly on
your system and help you become familiar with dkopp usage.
- Load
a recordable DVD/BD and let the auto-mount complete, if this is what your
system does. Otherwise dkopp will mount the selected DVD/BD device when
needed.
- Start
dkopp (this example assumes executable location is: /usr/local/dkopp/ )
if no privileges needed: $
/usr/local/dkopp/dkopp
if privileges are needed: $ sudo
/usr/local/dkopp/dkopp
- Select
button: [ edit job ]
- Set the DVD/BD device ID (choose from list of available devices if more than one)
- Select
full backup and full verify
- Erase the
default backup job shown (select and delete, or use the [ clear
] button)
- Select the
button [ file chooser ] at the bottom
- Navigate
through the directories and select some files/directories to be copied
double-click a directory to open it and enable selection within that
directory
select one or more files/directories, using left-mouse (or
shift+left-mouse)
use the [ include ] button to include all selected items in
the backup job
use the [ exclude ] button to exclude items previously
included at a higher level
use the [ include ] button to include items previously
excluded at a higher level
use the buttons at the top to go back up the directory hierarchy
use the [ hidden ] button to toggle the display of hidden
files
- select
the [ done ] button when finished selecting files
- Inspect
the generated include and exclude statements. These may be edited
directly if desired (e.g. erase mistakes or redundancies, change the
order, or make additions or revisions).
Re-enter the file chooser dialog if wanted - new choices will be
appended.
Cycle between the editor and file chooser as much as needed
- Select
button [ OK ] when done editing the job
- If
errors are shown, select [ edit job ] and fix (remember
that exclude statements must follow relevant include statements -
excludes are exceptions to prior includes)
- Select
menu: Report
> get backup files. Inspect the counts. Be sure the total byte count
is within the DVD/BD capacity. Look for zero counts, indicating possible
errors. Re-edit the job if needed.
- Select
button: [ run job ]. DVD/BD tray should load and backup should begin.
Verification should
follow automatically. Check that the error count is zero.
- Save the
job file if desired: menu: File > save job
- Select
button: [ quit ]
- Next
steps: play with incremental backups and reports
File Menu
open job
Open
a previously saved backup job file for re-use (edit, run).
The default
location for job files is /home/user/.dkopp (or /root/.dkopp).
open DVD/BD
Open
the backup job file on the currently loaded DVD/BD.
This file was saved on
the DVD/BD when the last backup job was run on that DVD/BD.
edit
job
Opens
an edit dialog for the current backup job (from the last job file
opened, or from a prior edit).
If no file has been opened,
internal default data will be used as a starting point.
show
job
List the current
backup job data and diagnose any errors.
save
job
Save
the current backup specifications in a job file.
Default is the same
file that was last opened, but you may select any file.
run
job
The current
backup job is executed. Backup and verify modes are taken from the job.
run
DVD/BD
The
backup job file stored on the DVD/BD is executed. Backup and verify modes
are taken from the DVD/BD job. Whenever a backup is performed, the current
job file (including any edits that were made) is copied to the DVD/BD.
Note:
what is copied to the DVD/BD is the current job, not
menu commands given manually. Thus, if you load a job file which
specifies incremental backup, and then do a full backup using the menu
command, the backup job stored on the DVD/BD will still specify
incremental. To change the job written to the DVD/BD, edit the job before
starting the backup.
quit
Exit program.
Backup Menu
full
The
current backup file set is copied to the DVD/BD fully. All files are
copied unconditionally. The DVD/BD is initialized beforehand (fast). For
large jobs, additional DVD/BDs will be requested as needed. If growisofs
aborts the job (declaring the DVD/BD to be "unknown type" or "not
formatted"), the menu command DVD/BD > format may fix the
problem.
Incremental
The current
backup file set is copied
to DVD/BD incrementally. New and modified files (since the DVD/BD was created
or updated) are copied. Files that already match their corresponding
disk files are not copied. Any "extra" DVD/BD files (not in the backup
file set) are deleted. At the end, the DVD/BD is 100% identical to the
backup file set, with the possible exception of files modified during
the backup run. See the technical notes for more details about how
matching files are recognized and skipped over.
accumulate
Same as
incremental, but without DVD/BD file deletions.
Verify
menu
full
All
files on the DVD/BD are read and checked for errors. DVD/BDs need this extra
level of protection, since poor media quality has been a problem. If
errors are detected, clean off the fingerprints or discard the DVD/BD. If
errors happen on more than 1% of your media, consider getting a new
drive or changing media brands. Note that any CD
or DVD or BD can be "full" verified - it does not have to be a dkopp backup
disk.
incremental
New
files on the DVD/BD are read and checked for errors. "New" means any files
written by an immediately prior incremental or accumulate backup. Files
not touched are not checked.
thorough
All DVD/BD files
are read
and verified that there are no read errors. Those DVD/BD files that have a
matching disk file (matching full path name and modification date/time)
are bytewise compared to the disk file, and any files not matching are
reported. There should be no differences. This verifies that all
hardware and software (driver, file system, dkopp) are working
correctly. DVD/BD files that are expected to be different (different mod
times) are read and checked for errors, but not compared with the disk.
Modification times have nanosecond resolution. Dkopp considers two
files to have the same mod times if they differ be less than one
millisecond.
The following counts are reported at the end of the verify job:
+ total DVD/BD files and bytes
+ DVD/BD files
having read errors (should be zero)
+ DVD/BD files
having matching disk files (by name)
+ DVD/BD files
having matching disk files (by name and mod time)
+ for the
last category, the number of DVD/BD:disk compare errors (should be zero)
Report menu
get backup files
The
backup job include and exclude statements are listed, along with the
file and byte counts that are added or removed by each statement. Look
for zero counts, indicating a possible error. The disk directories are
read and the list of files included in the backup job is saved in
memory. This data is used to determine what files are different between
the disk and DVD/BD and must be copied for an incremental backup. The file
list is static and is not updated by disk activity. The list of "new"
files that are checked with an incremental verify is also reset with
this command.
diffs summary
Report the total
number of files in each category:
new
on disk, but not on the DVD/BD
modified on both, but
not the same content
deleted on the DVD/BD, but not on disk
unchanged on both, with the same
content
Differences
between the disk and DVD/BD may be caused by disk updates (file additions,
deletions, updates, or moves), or by changes to the job file itself.
diffs by directory
Each
directory having differences between the disk and DVD/BD is reported,
along with counts of new, modified, and deleted files. The total bytes
for new and modified files is also given.
diffs by file
All
files that are different between the disk and DVD/BD are listed in
alphabetic sequence within groups for new, modified, and deleted files.
list backup files
All
files in the backup file set are listed in alphabetic sequence. Use
this to check that the correct files are being backed-up.
list DVD/BD files
All files on the DVD/BD are listed in alphabetic sequence.
find files
Enter
a search pattern with optional wildcards (e.g.
/home/dir*name/file*name).
All matching file names on the disk
(in the backup job file set) are listed. All matching file names on the
DVD/BD are listed. All backup log files are also searched, and those
containing the target file(s) are listed (by date / time and DVD/BD
label). These files correspond to backup jobs, one-to-one. Use this
method to locate all backup copies of a given file or group of files,
sorted from oldest to newest. A file may be present in multiple log
files for multiple incremental backups made to the same baseline full
backup, but it actually exists only once on the DVD/BD, in its latest
version.
view backup hist
All backup
history log files are
listed (up to 200). These correspond to backup jobs, one-to-one, and
contain a list of files copied to the corresponding DVD/BD. The most
recent 20 log files are put into a dialog for selection. Select one of
these from the dropdown list, or modify the input to select an older
file. The text editor gedit is invoked to display the log file. You can
page up and down and search for strings using gedit.
Backup
log file names are formatted as follows:
dkopp-hist-yyyymmdd-hhmm-label
Note
that one DVD/BD having a full backup and one or more incremental backups
will have a log file for each backup, showing those files copied for
each backup. A file may be present in multiple log files for multiple
incremental backups made to the same baseline full backup, but it
actually exists only once on the DVD/BD, in its latest version.
save screen
The main window,
where messages and reports are written, is saved in an ordinary text
file.
Restore
menu
setup DVD/BD restore
Specify
the copy-from location (on the DVD/BD), the copy-to location (on disk),
and the files to be restored. The copy-from location is the topmost DVD/BD
directory of a tree of files to be restored.
example: /home/joeblow/documents # note
that mount point is omitted
The copy-to
location is an existing disk directory where the tree of files will be
copied-to.
example 1: /home/joeblow/documents
example 2: /home/joeblow/documents/restored
In
example 1, the restored files will go back to the same place they were
when backed-up. In example 2, they will go to a new place.
Files
to be restored are specified the same way as in a backup job (see the
section below on using the file selection dialog). Use the button
[ file chooser ] to start the dialog.
If you need to restore
multiple trees of files, you can do this in multiple runs, or you can
simply begin the tree at a higher level and use the file selection
dialog to specify multiple sub-trees.
list restore files
After
performing the setup, use this function to list all matching files on
the DVD/BD that will be restored, exactly where they will be restored. You
should check this list carefully to be sure you are restoring the
correct files to the intended locations.
restore files
When
you are satisfied with the restore job specification, use this menu to
perform the restore. You will see a running log of the activity. Use
the kill button to stop the job if desired.
DVD/BD menu
set DVD/BD device
The DVD/BD device and mount point may be set independently of the backup job.
The DVD/BD device and mount point for the current backup job is modified.
No mounting is done.
set DVD/BD label
Set the DVD/BD
label that
will be used for a subsequent backup job. The default is to keep the
same label that the DVD/BD already has. The DVD/BD mount
command will show this label. If no label is assigned, "dkopp" is used.
mount DVD/BD
Mount a DVD/BD. Root privileges may be required. If the mounted DVD/BD has
been used for dkopp before, the date-time of the last backup to this DVD/BD is displayed.
eject DVD/BD
The DVD/BD is unmounted and ejected.
reset DVD/BD
This does a
hardware
reset to the DVD/BD drive. This is sometimes useful if a drive gets
locked-up and cannot be ejected using either the dkopp eject command or
the tray button. This sometimes happens when there is a DVD/BD error or a
backup is killed in mid-process. This may or may not work.
If the DVD/BD drive remains hung after several minutes, the only resort is
a reboot.
erase DVD/BD
Writes zeros to
the entire DVD/BD surface. This takes 10+ minutes, depending on the DVD/BD
drive speed and medium. This works only for rewritable media (DVD+RW or DVD-RW or BD-RE).
DVD-R and BD-R media are write-once and cannot be erased. See the note below on
privacy and data protection.
format DVD/BD
This uses the
dvd+rw-format utility to format a disk in a few
minutes. The entire DVD/BD is not erased. See the note below on privacy
and data protection. If Backup > full refuses to start, this format
command may fix the problem.
Help menu
contents
Display the help
file (this file).
about
Display the
dkopp program version and date.
Toolbar buttons
root
This button restarts dkopp with root privileges if the password (sudo) is correct.
edit job
Shortcut to the
backup job editor (same as menu File > edit job)
run job and run DVD/BD
The current job,
or the job on the DVD/BD, is executed.
pause and resume
The currently
running job or menu function may be paused and resumed.
Use this to
inspect output on the fly.
kill job
The
currently running function is killed. You may need to wait a while for
the function to die and screen output to cease. If a backup job is
killed, growisofs will gracefully exit in a few seconds, leaving the DVD/BD in an undetermined status.
clear
The main window,
where messages and reports are written, is cleared.
quit
Exit the
application. If the job file has been edited and not saved, you will be
given an opportunity to save the changes.
Editing
backup jobs (see screenshot below)
Select menu:
File > edit job or button: edit job
Fill-in the
following items in the dialog box:
DVD/BD device /dev/sr0
capacity GB 4.0
write
speed 4 (x 1.38 MB/sec)
backup mode check full
/ incremental / accumulate
verify mode check full /
incremental /
thorough
file
date from leave default (1970.01.01) or input a later date
Select the DVD/BD device from the drop-down list of available devices. The
DVD/BD capacity may
be set from 1.0 to 50 GB (for double layer Blue-ray media). Full
backups will be
limited to this amount. The default of 4.0 GB leaves a leftover space
of about 0.7 GB for incremental updates. See the technical notes for
more details about this. Write speed is the speed factor to use for
writing the DVD/BD medium. This is the "2x" or "4x" rating shown on the
DVD/BD. Leave this blank or zero to use the default speed. You may
select
a lower speed than the default if needed to increase reliability (i.e.
if the verify function reports errors). I have never needed this, but
others have reported that some media and drive combinations are not
reliable at the rated speed. If "file date from" is an additional
method for selecting files
to copy. Files with a create or modification date older than this will
be ignored.
File selection dialog
You may edit
the backup file set (the include and exclude statements) directly in
the text window. You may also use the browse button to get a standard
file selection dialog, with additional buttons: hidden, include,
exclude. The hidden button toggles the display of hidden files (file
names with leading dots, like .gnome). Select one or more directories
or files, using left-mouse or shift+left-mouse, then press the include
or exclude button. The selected files/directories will be written into
the text window as include or exclude statements. If you select a
directory, the entry is modified to add a wildcard at the next level:
selecting directory
/aaa/bbb/ccc →
include /aaa/bbb/ccc/*
You
may alternate between editing the text window and using the
file-chooser dialog. When you are done, press OK to accept. The
include/exclude data will be validated to the extent possible. Go back
and re-edit to fix any problems. To change the sequence, cut and paste
in the text window. When you are done, use the report functions "get
backup files" and "list backup files" to verify that you have the
correct files!
The include and exclude control statements allow precise control of the
backup file set:
include
/aaa/bbb/*
# include file tree under /aaa/bbb/
exclude
/aaa/bbb/ccc/* #
exception: exclude /ccc/ subtree
include /aaa/bbb/ccc/xxx.yyy # exception: include file
/ccc/xxx.yyy
The file-chooser
dialog may be used to quickly converge on the desired results. The
editor may also be used to make adjustments.
Because
of wildcards, newly added files within the scope of existing include or
exclude filespecs are automatically comprehended. In the above example,
if a new file is added somewhere within the /aaa/bbb/ tree, it will be
automatically included in the next backup job, unless of course it is
in the excluded /aaa/bbb/ccc/ subtree.

The
file > edit job menu command (or toolbar button) pops up the
middle box. This can be edited directly: click anywhere in the text
area
and start writing. The right box is the choose files dialog, which is
started with the browse button. Choose files using the
right box, and the middle box records your choices. You can navigate
around the directory hierarchy and select any number of files or
directories. The hidden button toggles the display of hidden files.
Click one of the include or exclude buttons to get the selected files
added to or removed from the backup list. Selecting a directory is an
implied selection of all contained files, thus the selection appears
as directory/* in the list of selected files. To make an
exception, go down one level, choose files, and select the opposite
include or exclude button. You can refine the file selections manually
if desired. It is sometimes handy to use wildcards in the directories
to make more general and compact selection criteria, e.g.
exclude
*thunderbird*/Trash*
will omit trashed mail even if the overlying
directories change (they do) and even for multiple users (the leading
wildcard includes "/home/*").
You
can add comments, or disable an include / exclude line, by
putting # in column 1.
Script Files
A
script is a text file with a series of commands that can be run as a
batch job. All dkopp menu commands can be scripted.
The
format of the records in the script file is as follows:
menu1 > menu2 > parameter # comment
The menu names
must match the interactive menu names exactly, including case.
To
run a script file: $ /usr/local/dkopp/dkopp -script
/pathname/scriptfile
You can also add the option -nogui
for deferred execution. Dkopp will not create a window or ask for any
inputs in this mode. You must leave a DVD/BD in the drive for dkopp to use
later.
Here
is a sample script file to get you familiar with the possibilities:
File > open job > jobfile1
Report > get backup files
DVD/BD > mount DVD/BD
Report >
differences-detail # report
changed files
Backup >
incremental
# back them up
Verify >
full
# verify all files
Report >
differences-counts # should
be zero
File > save screen > dkopp.log # save a
log file
DVD/BD > eject DVD/BD
File >
quit
The
toolbar buttons may also be used, e.g.
button > pause # press resume to continue
(at this point
you may use the menu interactively and then resume the script by
pressing the resume button).
The
command exit may be used to end the script file and return
to interactive mode.
Script file EOF
does the same thing.
Large Backup Jobs (more than one DVD/BD)
A full
backup may be larger than one DVD/BD, and you will be asked to load
additional DVD/BDs as needed. If a job is being run (rather than the menu
backup > full) each DVD/BD will be verified (if specified in the job)
before the next DVD/BD is requested. An attempt is made to fit all files
derived from a single include statement on the same DVD/BD, if
possible. This allocation is made after excluded files have been
removed from the backup file set. The job file written to each DVD/BD
reflects the files actually copied to that DVD/BD, so that subsequent
incremental updates may be done individually on each DVD/BD, e.g. as
follows:
File > open DVD/BD
Backup > incremental
Verify > incremental
Note
that if an include statement is too big to fit on one DVD/BD, this
strategy will not work as expected. The backup job file on the first
DVD/BD will have the big include statement, but additional DVD/BDs used
for
this same include will not. If possible, break up the large include
statement into smaller ones.
Technical Notes
DVD/BD auto-mount: If possible,
disable this - it is a source of conflict and
confusion, and the behavior varies with Linux distro and release. Gnome
automatically mounts an unmounted DVD/BD that dkopp is trying
to mount, resulting in a small war. If auto-mount is enabled on your
system, let it complete
before
starting dkopp. Dkopp will detect if the DVD/BD is mounted and use the
existing mount point. If
dkopp cannot mount the DVD/BD, it will unmount and mount several times
before giving up. A full backup does not require the DVD/BD to be
mounted,
since growisofs will initialize the DVD/BD.
If you use the Gnome desktop, you can run gconf-editor to prevent auto-mounting.
Edit keys are: /apps/nautilus/preferences/media_automount.
Running dkopp as root: Dkopp will
only copy
files for which the user has read access. If files belonging to root or
other users are to be copied, you must run dkopp as root. Use "su" or
"sudo", or log in as root (see the note below about making a launcher
to handle this). The growisofs manpage says it will not work using
"sudo". However, using dkopp with "sudo" (which starts growisofs as a
subprocess) apparently works fine. On some systems mounting a DVD/BD
requires root, making dkopp also require root. Dkopp has a toolbar button [root] which can be used to become the root user, after entering your sudo password.
"suid"
permission: Dkopp cannot run with the "suid" permission bit: the
GTK
library refuses to initialize. The GTK authors believe it is impossible
to maintain good security if non-root users are allowed to use GTK apps
with root permissions. If root privileges are needed, run dkopp as
root: $ sudo dkopp or gksu dkopp
Blank DVD/BDs:
the first time a DVD/BD is used, do a full backup. A blank DVD/BD will not
mount, but a full backup will still work and make the DVD/BD mountable
thereafter.
Flakey DVD/BDs: drive and media
combinations sometimes
have compatibility problems, resulting in media errors. The newest
drives (2006+) are much better at adjusting to media variations. I have
had a few DVDs (<1%) that passed a dkopp verify and then became
unreadable later, so make regular backups and avoid dependence on a
single DVD/BD.
DVD/BD lockups: growisofs can leave a DVD/BD drive in an
unresponsive state, making the following verify fail because the DVD/BD
cannot even be mounted. The backup is always OK and the verify works OK
after the DVD/BD has been ejected and reloaded. Use the DVD/BD reset or
eject
command and then one of the verify commands. This problem seems to
affect DVD+R and DVD-R media, but DVD+RW works normally. Sometimes the
DVD/BD drive is locked-up so badly that only a reboot can bring it back
to
life. I don't know if this is a Linux kernel problem or DVD/BD firmware
or computer BIOS problem.
Media
errors: If the dkopp verify function runs into a read error, the DVD/BD
drive may lock-up for a minute or more while retrying the failed read
hundreds of times. Give the "kill" command and wait for the drive to
give up. If the DVD/BD is dirty, clean it and try again. Otherwise throw
it out.
Privacy and data protection: to
protect your
private data on discarded DVD/BDs, you should destroy them. A few seconds
in a microwave oven will completely destroy the metallic recording
layer (with spectacular visual effects). Do not inhale the fumes.
Command line arguments:
$ dkopp -job jobfile
# load
job file
$ dkopp jobfile
# load job file
$ dkopp -run jobfile
# load job file and
run it
$ dkopp -script scriptfile
# run script file
$ dkopp -nogui -run
jobfile
# run job in non-GUI mode
The
-run and -script commands are intended for shell scripts. The -job
command is more useful for a desktop launcher, leaving the user free to
elect the backup mode or make other changes in the job before
execution. If the jobfile name contains blanks, quotes are required,
e.g.
$ dkopp -job "my dkopp job"
The -nogui option will prevent dkopp from opening a window or asking
for any interactive inputs. Use this for deferred operation (batch
job). You must leave a DVD/BD in the drive for dkopp/growisofs to use.
Desktop launcher: a desktop icon /
launcher may contain a command like this:
gksu /pathspec/dkopp -job myjob.job
gksu will ask
for the root or administrator password and run the job as root.
Deleted DVD/BD files: growisofs is used to perform the file copies. It can
replace
existing DVD/BD files with new versions, but it does not delete files. For
incremental backups, dkopp replaces deleted files with null files (zero
length). Full backups do not have this issue, since the DVD/BD is
initialized. If you recover files from a dkopp DVD/BD using a shell copy
command with wildcards, or drag-and-drop of an entire directory, you
may get unwanted null files. If this happens, it is easy to get rid of
them like this:
$ rm -i $(find /dir1/.../dirN -empty)
(remove all
empty files in a directory tree, with confirmation of each)
Note that if you
use dkopp restore, these null files are invisible and are not restored.
Incremental
backups:
a DVD/BD file is considered identical to its corresponding
disk
file if their lengths and modification times are the same. Incremental
backups exclude such files. If the modification times differ by less
than 1 second they are considered equal (another way to look at this
issue: file backup times may be wrong by up to 1 second). A thorough
verify will
read and compare the files unconditionally.
File names
containing "=": genisoimage requires that "=" in file
names
be
replaced with "\\=". DVD/BD files end up with "\=" replacing the original
"=". The file-chooser dialog in dkopp file restore shows "\=" instead
of "=", but the files will be correctly restored with "=" only.
Restoring
file owner and permissions: For some reason, genisoimage does
not
preserve
owner and permissions for directory files copied to DVD/BD, although data
files are preserved. To get around this, dkopp writes a special file to
the DVD/BD with the data needed for file restores.
Special dkopp files on DVD/BD:
Directory /dkopp-data is written to the DVD/BD with three files:
datetime backup date-time
and DVD/BD usage count
filepoop owner and
permissions for all backed-up files and directories
jobfile
a copy
of the backup job specs last used on this DVD/BD
These are
ordinary text files which you can view with an editor.
Special
file types: pipes, devices, and sockets are not copied. Symlinks
are
copied as such. Both symlinks and their targets should be included in
the backup or restore file set, since it makes no sense to copy one
without the other. This normally happens by default, since symlinks
typically link to files in the same directory. Symlinks are used
commonly in system directories and in the hidden system files within a
/home/user directory. For user files, there is no need for them.
Killing
growisofs (killing a backup job in progress): this will
sometimes leave
the DVD/BD in a condition that growisofs refuses to deal with. If you
decide to abort a backup job (e.g. to revise the job specs and start
over), you may get this condition. You should retry a full backup on
this DVD/BD. If growisofs still refuses, format the DVD/BD (dkopp menu), then
try the full backup job again.
Duplicate files: If job file
"include" statements overlap, resulting in duplicate files in the
backup set, this is reported and the backup is terminated.
GTK
thread locking: the functions zlock() and
zunlock() are used to surround GTK function calls and make them
thread-safe. These locking functions have also been coded to do nothing
if called from the main() thread, and to detect and avoid
redundant locking (a fatal bug) if there are nested calls.
Microsoft Windows: DVD/BDs created
with dkopp use the standard ISO-9660 file system, which can be read by
Windows.
DVD/BD drive and medium information:
here are two useful commands:
$ udevinfo -q all -n /dev/dvd # DVD/BD
drive information
$ dvd+rw-mediainfo
/dev/dvd # DVD/BD medium
information
Incremental backups: new and updated files are
written to a new "session" on the DVD/BD, along with new directory files
which may reference data files in both the old and new sessions.
Nothing is changed in the old sessions. Thus, incremental backups
consume more space on the DVD/BD even if the corresponding disk files are
not any bigger. For DVD+R, DVD-R and BD-R media (write once), only one full
backup may be made, and as many incremental backups as can fit in the
remaining space. For DVD+RW, DVD-RW and BD-RE media (rewritable), a new full
backup will initialize the DVD/BD and recover all space. These DVD/BDs can be
used until they wear out. I have exceeded 100 uses on a test DVD+RW
medium and it still works fine.
Growisofs
progress tracking: Growisofs (genisoimage) outputs a
"% done"
value every few megabytes. Dkopp uses this number to compute the
current position in the list of files to be copied, and the resulting
file is echoed to the main window. The update frequency is typically
less than once per file, so some file names will be bypassed. Large
files may stay on the screen for several update cycles.
For full backups, the math is straightforward. For incremental backups,
growisofs starts off with:
% done = 100 * (initial DVD/BD bytes used) / (final DVD/BD bytes used)
Dkopp assigns
this value to the first file in the backup list. The last file
is assigned 100%, and the rest are interpolated using accumulated bytes.
(poor)
Linux error codes: Linux error codes can be misleading. If an
attempt
is made to open a file that is already open and therefore locked, the
error code translates to "no such file or directory". The error codes
are the same for an attempt to mount an empty tray or a corrupted DVD/BD.
The same is true for an attempt to mount a DVD/BD that is already mounted,
or a blank DVD/BD. Dkopp outputs messages of its own that mention the
multiple possibilities. Hopefully
this will improve over time.
Backup history files: A
history file is generated for every backup job run.
location: /home/username/.dkopp/ (or) /root/.dkopp/
file name: dkopp-hist-yyyymmdd-hhmm-label
The
file name corresponds to the date and time of the backup and the DVD/BD
label. A history file contains a list of all the files copied to that
DVD/BD at that time. Thus, a DVD/BD used for a full backup and two
incremental backups will have three corresponding history files, each
one containing those files copied by the respective backup job. A full
backup spanning multiple DVD/BDs will have multiple history files, one
per DVD/BD. History files accumulate and are not
automatically deleted. When 200 files are reached, the find files and
view backup history reports produce warnings. Delete the oldest files
or move them elsewhere. The 200 limit is a compile time constant:
maxhist. This could be set much higher if desired (and if you have so
many DVD/BDs before you re-use them).
DVD/BD label: The menu DVD/BD >
set DVD/BD label is for an optional DVD/BD label
input, which you can use as part of your media management system. A
subsequent backup job will write this label to the DVD/BD, and the DVD/BD
mount command will show the label. Recommendation: for full backups,
set the label to match what is written on the DVD/BD (with a soft pen).
For incremental backups, leave the label unchanged.
genisoimage errors: If a disk file
is deleted after
growisofs
begins, the DVD/BD will be defective: directory entries for the missing
files and all following files will point to garbage (which may even be
readable). The error reported by genisoimage is ignored by
growisofs. Dkopp scans growisofs output for the ignored errors and
un-ignores them.
DVD/BD media types:
DVD+RW good for many (hundreds?)
of full and incremental backups
DVD-RW good for many
(hundreds?) of full and incremental backups
DVD+R good for one
full and many incremental backups
DVD-R good for
one full and many incremental backups
DVD-RAM good for many (thousands?) of
full and incremental backups
(reputedly the most
reliable)
BD-R good for one full and many incremental backups
BD-RE good for many (?) full and incremental backups