We all know it: nobody does backups. At least, most people don’t, anyway.
But everyone—and probably you, too—has important data.
What to do? If you’re on something other than Windows (or you’re using Cygwin on Windows) and you don’t mind a little bit of copy & paste, there is an easy answer here.
The xorriso
command makes this easy. Well, “easy”, meaning once you have
learned how, you can put it in a shell script and life is happy.
The xorriso
man page has an example, which I’ve adjusted very slightly, that
is useful for this task:
xorriso --abort-on FATAL --for_backup --disk_dev_ino on \
--dev /dev/sr0 --volid ${NAME}_$(date +'%Y%m%d%H%M%S') \
--update_r . / \
--commit --toc --check_md5 FAILURE -- --eject all
So, what does it do? In a nutshell, it places the current directory onto the
medium. If the medium is empty, then it does the whole thing. If you’ve done
this once (or more) before, xorriso
will perform a comparison of the current
state of the media and burn a new session with a new
TOC showing the updated state. Old files that
are not modified are not re-written to the media, meaning that each new session
only requires space for the session itself and the differences between it and
the previous one.
You can have a shell script such that all of your important directories are incrementally backed up.
Additional bonus: Reading the most recent version of the files burned to the media is as easy as popping it in the drive and using the file manager of your choice on any operating system—including Windows.
Previous versions, well, that’s for another time. It suffices to say that the previous versions still exist on the media, and the data (and TOC) present within those sessions can still be read.
Thanks for reading.
If you appreciated this article (or anything else I’ve written), please consider donating to help me out with my expenses—and thanks!