0

I browse various solutions for backing up :

  • tar (and his -N option, for incremental tar files)
  • dump (and his level feature backing only new files, if wanted)
  • fsarchiver
  • CloneZilla ...

Starting from one point : I aim to copy my whole disk for 1.backing up 2. clone it to another same virgin machine. Or the same machine (full restore).

What s the best (quick sure) way ?

ArchiT3K
  • 577
  • I used to do it with rsync – Arkadiusz Drabczyk Jun 22 '15 at 13:10
  • Personal preference. It works in command line and can use ssh to connect to a source host. Additionally, it can be used for creating incremental backups if one decided it's necessary in the long run. – Arkadiusz Drabczyk Jun 22 '15 at 13:13
  • ssh is a good point for rsync, note that rsync is less gentle about RAM than dump. "they are something to use for imaging filesystems, to be used instead of dd(1) or rsync(1), and good enough to backup your laptop to an external disk. Use something like zmanda or bacula if you need more" – ArchiT3K Jun 22 '15 at 14:50
  • tthank you. Does rsync embed all partitions in one backup ? or do you have to clone each one (boot, fs...) ? – ArchiT3K Jun 22 '15 at 14:52
  • rsync copies requested files just like scp or cp. It doesn't care about partitions etc. I used rsync to make a backup of Linux system running directly on a hardware and restored it inside VirtualBox. Just pick directories you will need to make a restore such as /usr, /etc, /home, /var, /root, /opt – Arkadiusz Drabczyk Jun 22 '15 at 14:56
  • @Arkadiusz Drabczyk : thanks. so you leave the boot away, a bit like dump. Am I right ? – ArchiT3K Jun 22 '15 at 15:00
  • Right, I wouldn't copy /boot directory because it's not necessary to restore system. I have never used dump though so I can't say nothing about it. I just know, IIUC, that rsync would be the right tool to do the job you want. However, as in everything, it's a matter of personal preference and knowledge of an particular tool. You need to make a decision yourself. – Arkadiusz Drabczyk Jun 22 '15 at 15:03
  • thanks. I aim to both clone and backup. That's my glitch. – ArchiT3K Jun 22 '15 at 15:18

1 Answers1

-1

To copy a disk to an identical disk use low level command dd. Or use tuned and safe save tools.

Obviously the copied disk have not to be accessed by the system (except dd itself).
dd is usually used to make a clone for a bootable disk to another bootable one.

Unix doc

Basic sample

cl-r
  • 107
  • 3
  • 1
    I have been said dd copy empty space, while dump does not. Why not dump ? – ArchiT3K Jun 22 '15 at 14:47
  • dd is low level, copy bytes to bytes from disk cylinders, it does not know what it copy. dump needs data in a partition. If you need sauvegardes use tools tested and tuned for this operation. – cl-r Jun 22 '15 at 14:54
  • dump works on ext2/3 filesystems, you asked for a method to clone one disk to another disk. – X Tian Jun 22 '15 at 14:55
  • thanks @c-r . does that mean : dd copies all disk partitions (boot, fs, ...) to another disk ? dump does not manage boot partition ? – ArchiT3K Jun 22 '15 at 14:56
  • @ArchiT3K You have understood : dd copy not only partition, but the hooks : all bytes from all cylinders of a disk from byte 0 to the last includ. It is powerful but maipulation errors are desastrous, use shell tuned and tested to manage it. – cl-r Jun 22 '15 at 16:34
  • 4