umm, I am writing this directly on the forum, so I will probably make some syntax errors:
Code:
#!/bin/bash
rm /tmp/dvd.*
FOLDER_TO_BACKUP="/home"
SIZE=0
COUNT=0
for FILE in $(find $FOLDER_TO_BACKUP);do
let SIZE=$SIZE+`du $FILE | cut -f1 -d" "`
if [ $SIZE -gt 47000000 ]; then
let COUNT=$COUNT+1
$SIZE=0
fi
echo $FILE >> /tmp/dvd.$COUNT
done
This should less or more create a file list for each DVD. The next part would be to create an iso image with dd, loop mount it, recreate the folder structure in the image and copy the file. Then using growisofs or any burning command, burn the .iso.
The list will be stored in /tmp/dvd.*** where *** is a number starting from 0 representing a DVD.