If you want to back up the contents, including files and folders from any drive, or if you have a bunch of files and folders that you want to back up and store, you can save them to an ISO file using the AnyToISO tool on Windows. But what if you're using Linux? Check out the guide below from Mytour on creating an ISO file on Linux.
Guide to Creating an ISO File on Linux
1. Creating an ISO File on Linux using Archive Manager
If you're using Ubuntu (or Gnome), the Archive Manager application allows you to easily create an ISO file.
Step 1: Open File Manager. Select the files and folders you want to back up. Right-click and choose Compress.
Step 2: Choose .iso and then click Create. This action will compress all files and folders into an ISO file.
2. Using Command Line Utility
dd is a handy command you can use to create an ISO file on Linux. All you need to do is specify the source and destination, and the command will perform the task of creating an ISO file.
Utilize the basic command below:
dd if=source of=destination
For instance, if you wish to mount the CD-ROM drive to “/dev/hdc”, and you want to back up files and directories from the drive into the file my-cd-backup.iso, you can use the command below:
dd if=/dev/hdc of=/home/username/my-cd-backup.iso
The source doesn't have to be a CD-ROM drive. It could be a partition on the hard disk, an external drive, or a file path, although it won't work on directories.
Alternatively, you can also use the mkisofs command to create an ISO file. The advantage of mkisofs is that it provides users with many options to customize how they want to create the ISO file.
Utilize the basic command below:
mkisofs -o destination-filename source
For example, use the command below to back up the Home directory:
mkisofs -o myHomeBackup.iso /home/username
You can enable the Rockridge extension with mkisofs by installing the -R option:
mkisofs -R -o myHomeBackup.iso /home/username
The Joliet extension is activated using the -J flag:
mkisofs -J -o myHomeBackup.iso /home/username
Additionally, you can set a partition (option -V) for the ISO file. If you're burning the ISO file to a CD, the partition name will be used as the CD drive name.
mkisofs -V 'Home Folder Backup' -o myHomeBackup.iso /home/username
You can also exclude certain files from being added to the ISO file using the “-m” option. It supports wildcards (*) so you can use the command below to exclude all hidden files (files with a “.” at the beginning of their names) from being added to the ISO file:
mkisofs -m '.*' -o destination source
Check all options of mkisofs with the command below:
mkisofs --help
While not the best backup option, an ISO file can be handy in certain cases. Mytour has just guided you on how to create an ISO file on Linux. Hopefully, this article will be helpful to you. Wishing you success.
