A reliable backup strategy for a newbie

Okay, I really wanted to come up with a method of backing up my mbr, and I think that may have come up with something.

If I enter gpart show, I get the below information:
Code:
=>        40  1953525088  ada0  GPT  (932G)
          40      532480     1  efi  (260M)
      532520  1945624568     2  freebsd-ufs  (928G)
  1946157088     7368040     3  freebsd-swap  (3.5G)

I noticed that the efi partition is 260MB in size, and that ends at 532480, and that the next partition starts at 532520. So, based upon this information, I issued the below command to create an image file of the first 532500 blocks, which I'm hoping will not interfere with the next partition at 532520, if I should have to restore the image. Please see below code.



Code:
mkdir -p /backup/bootloader
dd if=/dev/ada0 of=/backup/bootloader/bootloader_BCK.img bs=512 count=532500
532500+0 records in
532500+0 records out

Also, below is a screenshot of the image file I ended up with in /backup/bootloader

result_bootloader_img.jpg



So, now I'm wondering what will happen if I try to use the dd command to restore the above image back to its original location at /efi ? Will I destroy my entire partition table, or is it likely to work? Any info greatly appreciated.
 
Another important thing to learn about rsync is what effect a trailing "/" has on the source and the destination.
I think that I noticed that it will sometimes create another directory at the destination, if you leave a "/" at the end of the rsync command. Maybe I'm wrong, but it seemed that way.
 
Back
Top