Question

I want to backup my NAS on multiple DVD's. What i had in mind was a script what does the following:

-Create a folder for each DVD -Copy the files and filestructure into the DVD folders -Stop / goto next DVD folder when the first DVD folder is full

i.e. the trigger is 4 GByte (which calculates easy for the example)

I have a datasrouce with 10 gb of data., so this will be 3 DVD's. So the script first create three folders: DVD-1, DVD-2 and DVD-3. Next the copy will start to copy 4 GB to the DVD-1 folder. After that, the remaining files must come in DVD-2 and DVD-3.

As far as i know, rsync and cp doesn't bother about calculating this. I know it is an option to do this by using archives like zip, tar or gz but at first i want to try it with unpacked files.

Is all above an option with standard Linux bash commands or is it insane?

Was it helpful?

Solution

No, there isn't any standard tool that does this out of the box. But it's pretty simple to code up, and there are a few projects to do it:

https://unix.stackexchange.com/questions/18628/generating-sets-of-files-that-fit-on-a-given-media-size-for-tar-t

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top