|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
backup drive to image file
Hello, i want to backup drive ( there's openbsd 4.3 with postfix config, mails) to an image file one time a week. I ve mounted my nt share in : /nt_1
i want to backup the image to /nt_1/backupOpenBSD.img How can i do that as simply as possible ? using dump ? dd ? cp ? Last edited by milo974; 11th August 2008 at 06:54 AM. Reason: more precision |
|
|||
dump(8) & restore(8) are your safest bets. You should also look at recommendations in Section 14.9 as well:
http://openbsd.org/faq/faq14.html#Backup |
|
|||
Hello,
Thank's to your ans, i want only backup my openbsd partition to a file : /nt_1/myopenbsd.img ?? i need to use dd ? How can i achieve my goal please ? Thank's. Last edited by milo974; 13th August 2008 at 07:43 AM. Reason: more precisions |
|
||||
Here is one possibility, which assumes the hard drive you want to replicate is wd0. Note that I chose to use the raw (character) device, as I have found this is usually faster than cooked (buffered) device for this sort of thing.
If the number of sectors are evenly divisible by some blocksize, you can increase the speed of replication by using the "bs=" operand. Read the dd(1) man page. # dd if=/dev/rwd0c of=/nt_1/myopenbsd.img Here is another method, where the output is piped through a compression step: # dd if=/dev/rwd0c | gzip > /nt_1/myopenbsd.img.gz
|
|
||||
Two thoughts:
|
|
|||
i ve tried dd to backup rwd0, i saw it copied not only the system and datas but the entire partition so it takes a long time, and it is very big!
I only want to backup the partition (only system, datas, nothing else) like Norton ghost can do... Is there a way to do that ? What i want : backup openbsd+datas to restore on an over hard disk and boot on. |
|
|||
Quote:
Quote:
Quote:
Lastly, it sounds like you are in a mixed shop of OpenBSD & Windows, hence your question about Ghost. You will be helping yourself by becoming familiar with the way Unix/OpenBSD treat disks. Taking the time to study Section 14 of the FAQ will have benefits down the road: http://openbsd.org/faq/faq14.html |
|
||||
As I mentioned above, and as you should have learned during installation .... the "c" partition is the entire hard drive.
As I mentioned above, dd(1) copies every sector, regardless what is in it. So if you are using dd to back up a 250GB hard drive, the output of the dd command will be 250GB. As mentioned several times to you, the standard practice is to use tools which back up individual filesystems. Several were already mentioned: dump/restore, tar, cpio, and pax. Specifically for OpenBSD, dump/restore is most often recommended -- tar is handy for small hierarchies but is usually unable to backup complex directory structures due to filename size limitations. For disaster recovery, the ramdisk kernel (bsd.rd) booted from installation media is typically used -- all of the built-in tools mentioned are included with that kernel. One would recreate and restore all filesystems -- if your system uses daily(8), you will find your disklabels in /var/backups, so you might restore /var first to acquire them. Note that restore(8) requires some space in /tmp, so if using bsd.rd, you will need to mount /tmp before running restore. Installing boot blocks is done with installboot(8). |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PHP read file contents - Maximum file size | cksraj | Programming | 1 | 21st September 2009 11:38 AM |
backup freeBSD 7.0 using Backup Exec | ccc | FreeBSD General | 2 | 25th April 2009 09:23 PM |
Backup to USB flash drive | giga | FreeBSD General | 5 | 8th December 2008 11:06 PM |
Image Titles | JMJ_coder | Feedback and Suggestions | 4 | 1st July 2008 05:40 AM |
How to make an image from a DVD | PatrickBaer | FreeBSD General | 11 | 25th May 2008 11:48 AM |