|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Simple backup questions
Hi There
To backup a FreeBSD file system to an external usb hard-drive the command is: Code:
#dump -OLuf /path/to/external/drive /dev/ad0sla The only thing is that i backed up my MacBook first, so i think it is formatted for HFS+. So do i need to re-format the drive in order to back up FreeBSD filesystems?. I also want to back-up my OpenBSD filesystems on the same drive. However the only system that i have with a windowing system, and GUI utilities is the MacBook, at the moment. So do i need to format this external drive or should i leave it un-formatted. if i need to format it what should i format it as?. If I'm just using it for storage do i need to format it?. Can i just enter the above dump command to put it on the HFS+ formatted drive?. I'm sorry to ask so many questions. I've just never backed up whole systems before. Thank you for your time, and any replies you might send regards unixjingleman |
|
|||
You can check the filesystem type by using fdisk on the external drive, usually /dev/da0 under FreeBSD.
Code:
# fdisk /dev/da0 Usually external drives are formatted with DOS/FAT32 or NTFS. The problem with FAT32 is the maximum file size of 4 GB. NTFS cannot be written to reliably on most BSDs. Re: command to dump a fileystem You forgot the '-a' option. See http://www.daemonforums.org/showthre...5708#post36923 If your drive is HFS+ and FreeBSD does not support reading/writing HFS+, FreeBSD cannot write the dump file to it.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Thank you very much for your fast reply. So what should i do to the drive(external usb) in order to back up my whole FreeBSD and OpenBSD systems?(i don't mind if i can't back up my MacBook on the same drive. My other BSD's are of more importance)
|
|
|||
Why don't you first check with fdisk which file sytem is on the drive?
You could format the disk with OpenBSD UFS, which FreeBSD also can read/write. If the disk is big enough you could make one partition/slice for FreeBSD and another one for OpenBSD. Or even a third one with HFS+
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
When you put, say ads1a, on an external drive do you have to use disklabel on the external hard-drive, once you've used fdisk, to create the partitions first?. Or can you just allocate space and whack 'em on, once you've allocated space using fdisk?. Because when you're using dump aren't you copying the partitions anyway?
|
|
|||
You can dump to files instead of partitions.
|
|
|||
In your case dump will write to file, so it needs a filesystem to place the file on it.
With both FreeBSD and OpenBSD you don't need to label the disk. FreeBSD will access the drive with it's slice numer, say /dev/da0s1. OpenBSD will create a virtual or spoofed disklabel, which you can see with running the OpenBSD disklabel on the external USB disk. If all computers are networked, then there another less complicated option. Just tell dump to send the dump over the network to the Apple box, having the external USB drive connected to it. I do this with my OpenBSD router/firewall.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
But otherwise you have to dump to partitions, not just slices?
Sorry that reply was to BSDfan666 not j65nko Last edited by J65nko; 27th February 2011 at 08:58 PM. |
|
|||
So, for the non-networked way, all i need to do is use fdisk and not disklabel. Then run the dump command?.
|
|
|||
Oh sorry. So in order to not use disklabel you have to use fdisk, then dd?
|
|
|||
Dumping files from OpenBSD box through the network to another box. In your case, Apple box
I will use two OpenBSD boxes. parmenides is the one whose "/home' directory will be dumped through the network to host hercules. On hercules start nc (netcat) to listen for data on port 4000 and redirect the output to file: Code:
j65nko@hercules[~] nc -l 4000 >firewall.dump Now I ssh in to parmenides, become root and run the dump Code:
j65nko@parmenides[~] su - root Password: xxxxxxxxxxxxxxx root@parmenides[~] dump -0 -a -u -f - /home | nc hercules.utp.xnet 4000 DUMP: Ignoring u flag for subdir dump DUMP: Dumping sub files/directories from / DUMP: Dumping file/directory /home DUMP: Date of this level 0 dump: Sun Feb 27 07:08:46 2011 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rwd0a (/) to standard output DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 131807 tape blocks. DUMP: Volume 1 started at: Sun Feb 27 07:08:46 2011 DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: 1.66% done, finished in 4:56 DUMP: 3.32% done, finished in 4:52 Code:
j65nko@hercules[~]file firewall.dump firewall.dump: new-fs dump file (little endian), This dump Sun Feb 27 07:08:46 2011, Previous dump Thu Jan 1 01:00:00 1970, Volume 1, Level zero, type: tape header, Label none, Filesystem a subset of /, Device /dev/wd0a, Host parmenides.utp.xnet, Flags 3
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Thanks a million dude.Why is that so much easier than just writing straight out to an external usb drive though?.
Last edited by unixjingleman; 27th February 2011 at 09:48 PM. |
|
|||
What about:
Code:
dd if=/dev/ad0s1a conv=noerror, sync | ssh macbook "cat > root.dump" That might be more secure also. Whada ya think? |
|
|||
While more secure, that will also copy the unused space of your disk, while dump only will backup the space actually used. Not so nice if you have 100GB free space
In my example, for security reasons, you can also use ssh instead of nc. RE: filesystem on your USB disk I am not sure about your Apple OS, but both FreeBSD and OpenBSD can write to the Linux ext2fs filesystem.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
And read from it as well yeah?
|
|
|||
Do a ls -l /sbin/mount* to find out.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple pf ruleset | jhp | FreeBSD General | 2 | 30th March 2010 02:05 PM |
backup freeBSD 7.0 using Backup Exec | ccc | FreeBSD General | 2 | 25th April 2009 09:23 PM |
A simple question | Mr-Biscuit | Off-Topic | 1 | 16th April 2009 04:26 PM |
Simple Firewall with PF | jones | FreeBSD General | 3 | 7th November 2008 02:02 AM |