If you use Haiku on a regular basis, you might need to do a backup of your entire system.
Below is a step by step on how to do, supposing you have an external USB drive to store the backup.
First, verify the required size for the backup. Do a "Get info" on your system :
The backup size needed is 57 Gb in my case :
Plug the external USB hard drive and launch Drive Setup :
The device location is /dev/disk/usb/1/0/raw. Let's format it to Be File System and name it "HaikuBackup" :
The USB hard drive is now dedicated to Haiku :
Note : the "/HaikuBackup" disk should now be mounted on your system.
We will not use all the space of the USB drive for the backup, so we will create an image corresponding to the size required.
In my case, 57 Gb is needed, which I have rounded to 60 Gb.
It represents 60 * 1024 Kb = 61440 Kb.
Now we need to use the "dd" utility to create a blank image named "backup_haiku.image" on the external USB drive as below :
dd if=/dev/zero of=/HaikuBackup/backup_haiku.image bs=1024k count=61440 status=progress
It will takes several minutes depending on the image size. Wait until the completion message :
And check the result :
Yes it's a 60 Gb image :)
You can check also how it looks like in Drive Setup :
Now let's recognize that image in Haiku.
For that use the mkfs utility and the resulting filesystem will be mounted at "/backuphaiku" :
mkfs /HaikuBackup/backup_haiku.image /backuphaiku
It will take several minutes.
Once done, check the result in the tracker and double click on the "backup_haiku.image" :
The image is now accessible through the "/-backuphaiku" mount point :
Launch the Installer utility. Select your system to backup as "Install from".
Then select the destination of the backup as "Onto", which is the 60 gb image we have just created (mounted at "/-backuphaiku") :
Proceed with "Begin".
The backup will start :
Wait until completion with the below message :
Your entire system is now backup :)
On the left is the original "/boot/system" folder, while on the right the "/boot/system" from your backup :
Why some folders don't appear ?
It's normal, because they don't actually exist on your original system hard disk.
Indeed they're mounted from package contents using packagefs.
If you would like more information on that, there's nice article named Haiku package management on markround.com.
You should see them again when you will restore your system :)
Any tips you would like to share about doing backup on Haiku ?
Just leave a comment below.