I am looking into the collective wisdom of the FreeBSD forums for advice on keeping my current, primary drive cloned to a secondary drive. My FreeBSD machine has become my primary work computer and I would like to keep a clone of my current file system. I have installed a second drive and partitioned it to match my primary drive and have cloned the file systems. I would like to keep secondary as current as possible. I issued this for the initial cloning (obviously mounting the secondary partitions under /mnt/<mount point>):
I am planning to do this on a regular basis
Is this an ok approach? Is there a better solution?
BTW, I am not interested in RAID. I want to do the clone when I know that my current system is in good shape (such as prior to upgrading ports or other critical components).
I also only plan to mount the secondary drive when I plan to do the clone. I don't plan to always have the secondary mounted.
Code:
#!/usr/local/bin/bash
dump -0 -a -L -f - / | ( cd /mnt/root ; restore ruvf - )
dump -0 -a -L -f - /var | ( cd /mnt/var ; restore ruvf - )
dump -0 -a -L -f - /tmp | ( cd /mnt/tmp ; restore ruvf - )
dump -0 -a -L -f - /usr | ( cd /mnt/usr ; restore ruvf - )
I am planning to do this on a regular basis
Code:
#!/usr/local/bin/bash
dump -1 -a -L -f - / | ( cd /mnt/root ; restore ruvf - )
dump -1 -a -L -f - /var | ( cd /mnt/var ; restore ruvf - )
dump -1 -a -L -f - /tmp | ( cd /mnt/tmp ; restore ruvf - )
dump -1 -a -L -f - /usr | ( cd /mnt/usr ; restore ruvf - )
Is this an ok approach? Is there a better solution?
BTW, I am not interested in RAID. I want to do the clone when I know that my current system is in good shape (such as prior to upgrading ports or other critical components).
I also only plan to mount the secondary drive when I plan to do the clone. I don't plan to always have the secondary mounted.