Hi, pe...@easthope.ca wrote: > This function is applied every week or two to write to a DVD. > xorriso -for_backup -dev /dev/sr0 \ > -update_r . / \ > -commit \ > -toc -check_md5 failure -- \ > -eject all ; > > Finding a file as it existed months or years ago can be tedious.
You could give the backups volume ids which tell the date. -volid BOB_"$(date '+%Y_%m_%d_%H%M%S')" (BOB = Backup Of Backup :)) This would also make it possible to verify that the medium is either an appendable BOB or blank. Before -dev you would insert: -assert_volid 'BOB_*' fatal As a whole: xorriso -for_backup \ -assert_volid 'BOB_*' fatal \ -dev /dev/sr0 \ -volid BOB_"$(date '+%Y_%m_%d_%H%M%S')" \ -update_r . / \ -commit \ -toc -check_md5 failure -- \ -eject all Then -toc can later tell the backup date. I do daily backups with "HOME_" instead of "BOB_": Media current: BD-RE ... ISO session : 1 , 32 , 2129457s , HOME_2024_02_10_152530 ISO session : 2 , 2129504 , 26203s , HOME_2024_02_11_151813 ... ISO session : 138 , 8090176 , 34330s , HOME_2024_06_26_152446 ISO session : 139 , 8124512 , 50534s , HOME_2024_06_27_152907 Media summary: 139 sessions, 8172847 data blocks, 15.6g data, 7643m free which gives me the opportunity to guess the volume id by date: sudo osirrox -mount /dev/sr4 volid '*_2024_04_30_*' /mnt/iso With less regular dates it would be helpful if the user could wish for "youngest_before_given_date". I will ponder ... For now you would have to apply manual work or your own shell magic based on the output of xorriso -indev /dev/sr0 -toc in order to find the appropriate sbsector number, unless you can describe the date string by a shell parser expression. > Now I have a pair of 500 GB external USB drives. Large compared to my > working data of ~3 GB. Please suggest improvements to my backup > system by exploiting these drives. I can imagine a complete copy of A > onto an external drive for each backup; but with most files in A not > changing during the backup interval, that is inefficient. You could let xorriso do a daily update. E.g. on a file of the mounted read-write filesystem on the external disk destination=/mnt/backup_disk/xorriso_daily.iso ... xorriso ... \ -dev "$destination" \ ... -not_leaf 'Trap*' \ -not_leaf '*.mp3' \ -not_leaf '*.mp4' \ -update_r "$source" / \ ... (-eject all would be futile. :)) You could easily have one or more ISOs with history and one or more rsync mirror trees in the same filesystem. It is always good to keep one valid backup untouched when the other gets endangered by writing. (If xorriso -update_r is too slow compared to rsync, consider xorriso command -disk_dev_ino as in the man page example.) You could also dedicate the whole plain disk device without any prepared partitions or filesystems (i do this with USB sticks): xorriso ... -dev stdio:/dev/sdd ... or a partition without prepared filesystem: xorriso ... -dev stdio:/dev/sdd1 ... In the beginning you would have to pseudo-blank the device file, so that xorriso does not find data in its first few kB which would let it declare it as "closed": xorriso -outdev stdio:/dev/sdd -blank fast (dd-ing 64 KiB of /dev/zero would have the same effect.) Have a nice day :) Thomas