Are you looking to back up your existing Ubuntu server installation to put it on additional hardware? Unsure how to do it? We can help! Follow along to learn how to back up your Ubuntu server installation!
Note: to do a backup with Clonezilla, you need an external USB hard drive. A large USB flash drive will also work. Ensure you have enough storage to hold the backup!
Making the Clonezilla USB
There are a few ways to backup and Ubuntu servers, but the most straightforward way is by using Clonezilla. To use Clonezilla, we must create a bootable USB. Follow the step-by-step instructions below to create your bootable Clonezilla USB.
Step 1: Head over to the Clonezilla website and download the latest release of the operating system to your computer. For best results, grab the latest “Stable” release.
Step 2: After downloading the latest Clonezilla ISO to your computer, you must download the Etcher USB/SD Card imaging tool. To get your hands on Etcher, head over to Etcher.io, click the download button, and get it working.
Etcher works on Mac, Windows, and Linux so you should have no issue getting it to work no matter what computer you are making your bootable Clonezilla USB on!
Step 3: Once you’ve downloaded Etcher and gotten it working, plug in a USB flash drive of at least 1 GB in size. Then, find the “Flash from file” button in Etcher, and click on it with the mouse.
Upon clicking on the “Flash from file” button, a pop-up window will appear. use this pop-up window to browse for the Clonezilla ISO file you downloaded to your computer previously.
Step 4: Select your USB flash drive in the Etcher UI if it does not automatically detect it at startup. If you’re having issues selecting your USB, try restarting Etcher and trying again.
Step 5: Find the “Flash!” button in Etcher, and click on it with the mouse to start the imaging process. Keep in mind that this imaging process may take quite a bit of time, depending on how fast your computer is, so be patient.
When Etcher is done, you will see the completion message. From here, unplug the Clonezilla USB from your PC, plug it into the Ubuntu server, and reboot it to boot from USB with the BIOS.
Backing up Ubuntu server with Clonezilla
To start the backup process, select “Clonezilla live” in the boot screen using the Up / Down arrows on the keyboard. Press Enter to confirm. Then, follow the step-by-step instructions below.
Step 1: The first screen you will see is the “Which language do you prefer” window. Using the arrow keys, select your language. Press Enter to confirm.
Step 2: After selecting your language, you will see “Start Clonezilla.” Press Enter to start the Clonezilla tool.
Step 3: Upon starting Clonezilla, you’ll be asked to choose a type of backup. The best choice is to choose the “device-image” option, as it will allow you to save your backup directly to the USB hard drive.
Step 4: Once the “Device Image” option is selected, a new page will appear. On this page, choose the option “local_dev” using the Up / Down arrow keys. Press Enter to confirm the selection.
Step 5: Upon selecting “local_dev,” Clonezilla will ask you to plug in a USB device. Plug in the USB hard drive to the server’s USB port. Do so. Then, press the Enter key to confirm.
Step 6: After plugging in your USB device, Clonezilla will scan for it. Wait for a few minutes. Press Ctrl + C to close the scan screen after a few minutes has passed.
Step 7: Once the scanning screen is closed, you will see a message from Clonezilla. This message states that you need to select the hard drive to save the backup onto. Look through the list of hard drives and select your external USB hard drive (or flash drive.)
Note: Can’t find your USB flash drive? Think about how large it is GB wise. Or, look for the USB hard drive’s label, as Clonezilla will print it on screen.
Using the Up / Down arrows, select your USB hard drive. Press Enter to confirm the selection.
Step 8: After selecting the USB hard drive as the backup location, a message screen will appear that says, “Which directory is for the Clonezilla image repository?” By default, it will select the root folder of the device.
Leave it at the default option, and select the “Done” option with the Left / Right arrow keys. Press Enter to confirm your choice.
Step 9: On the next page, select the “Beginner mode” option. Beginner mode makes things very easy.
Past “Beginner mode,” select the “savedisk” option. This option will allow you to save your existing Ubuntu server’s hard drive as one image.
Step 10: Once you’ve selected the “savedisk” option, you will be prompted to name your backup. Write in the name in the text box, and press Enter.
Step 11: You must now choose the disk to back up. Using the UI, select the Ubuntu server’s hard drive. Select “OK” to continue.
Step 12: When the Ubuntu server’s disk is chosen, Clonezilla will ask you to choose a compression option. Select either “-z1” or “-z9” and press Enter.
Step 13: Following the compression option, you must choose if Clonezilla should fix any filesystem errors during the scan. Choose “-fsck” if you need to fix the filesystem. Else, select “-sfsck” to skip it. Press Enter to confirm your selection.
Step 14: Clonezilla will ask if you want to encrypt the backup. If you want the backup encrypted, select the encrypt option. Otherwise, choose the “not encrypt”option, and press Enter to continue.
Step 15: Choose if you want Clonezilla to shut off after the backup. Then, press the Enter key to start the backup process.
Clonezilla will take a long time to create a complete backup of your Ubuntu server’s hard drive. Be patient! When the process is complete, you will see a success message on the screen!