If you want to back up the content of a disc or if you have a bunch of files and folders that you want to back up and archive, here is how you can create ISO files in Linux.
Via Archive Manager
If you are using Ubuntu (or Gnome desktop), the Archive Manager application (file-roller) allows you to easily create an ISO file.
Open the file manager. Select the files and folders that you want to back up. Right-click on them and select “Compress.”
Select “.iso” option, and click “Create.” This will compress all the selected files and folders into an ISO file.
Via Command Line
dd is a useful command that you can use to create ISO file. All you need to do is specify the source and destination, and it will do the necessary work of creating an ISO file. The basic usage is as follow: For example, if your CD-ROM drive is mounted at “/dev/hdc,” and you want to back up the content of your disc to a “my-cd-backup.iso” file, you can use the following command: The “source” doesn’t have to be a CD-ROM drive. It can be a hard drive partition, an external drive or a file path, though it won’t work on a folder. Note: there is much more to dd than described above, but we won’t go into the details here. Alternatively, you can also use the mkisofs command to create an ISO file. The advantage of mkisofs is that it gives you more options to customize how you want the ISO file to be created. The basic usage is as follow: For example, use the following command to backup your Home folder: You can tell mkisofs to enable Rockridge extension by setting the -R option. The Joliet extension is enabled by the -J flag. You can also set a volume name (-V option) for the ISO file. (If you burn your ISO file to a CD, the volume name will be used as the CD’s name.) You can also exclude certain files to add to the ISO file with the “-m” option. It supports wildcard (*), so you can use it for something like the following to exclude all hidden files (filename with a “.” in front) from adding to the ISO file. Check out all the options of mkisofs with the following command:
Conclusion
While it may not be the best backup option, an ISO file can be rather useful in some instances. With the above instructions, you can now create ISO files with ease.