The Archives

  • 30.Jan.15
    Backup & Restore the Master Boot Record shell | rafacas | (0)
    Some days ago I had to recover the Master Boot Record (MBR) of a damaged hard disk. The MBR is the first 512 bytes of a storage device. It contains an operating system boot loader and the storage device’s partition table. If you need to make a backup of the MBR type the following command: dd if=/dev/sda of=/root/mbr.img bs=1 count=512 You only have to change sda with the device name that correponds to your hard disk. To restore it: dd if=/root/mbr.img of=/dev/sda bs=1 count=512 And as before, change sda with the device name that corresponds to the hard disk you are going to restore the MBR ...
  • 15.Sep.11
    Resume rsync file transfers network | rafacas | (1)
    I did not know that rsync had the resume capability till last week when I had to transfer almost 200GB between two servers with no good connection. I think some context is needed here: My company has two servers in two different cities where the backups are stored. There is a daily syncronization between the backup tree between the servers. That is, a cron task that calls a script that basically runs rsync. Due to the bad connection, I have had to add the -P option to the rsync command so that the command run by the cron task is: $ rsync ...