From owner-freebsd-questions@FreeBSD.ORG Wed Sep 30 01:26:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAFBF106568F for ; Wed, 30 Sep 2009 01:26:17 +0000 (UTC) (envelope-from af.gourmet@videotron.ca) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 83FB38FC14 for ; Wed, 30 Sep 2009 01:26:17 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8 Received: from [192.168.0.51] ([96.21.103.185]) by VL-MH-MR002.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KQR00K9HFZSVVA0@VL-MH-MR002.ip.videotron.ca> for freebsd-questions@freebsd.org; Tue, 29 Sep 2009 21:26:17 -0400 (EDT) Message-id: <4AC2B3BB.4080807@videotron.ca> Date: Tue, 29 Sep 2009 21:26:19 -0400 From: PJ User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) To: Warren Block References: <4AC29BE6.4000505@videotron.ca> In-reply-to: Cc: freebsd-questions@freebsd.org Subject: Re: backups & cloning X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2009 01:26:17 -0000 Warren Block wrote: > On Tue, 29 Sep 2009, PJ wrote: > >> I am getting more and more confused with all the info regarding backing >> up and cloning or moving systems from disk to disk or computer to >> computer. >> I would like to do 2 things: >> 1. clone several instances of 7.2 from and existing installation >> 2. set up a backup script to back up changes either every night or once >> a week >> >> There are numerous solutions out there; but they are mostly confusing, >> erroneous or non functional. >> To start, could someone please explail to the the following, which I >> found here:http://forums.freebsd.org/showthread.php?t=185 >> >> You can move system from disk to disk on fly with >> Code: >> >> $ newfs -U /dev/ad2s1a >> $ mount /dev/ad2s1a.... /target >> $ cd /target >> $ dump -0Lauf - /dev/ad1s1a | restore -rf - > >> This may be clear to someone; it certainly is not to me. >> As I understand it, newfs will (re)format the slice. >> Ok, But what is standard out in the above example. The dump is from >> where to where? > > dump is reading /dev/ad1s1a and using stdout for output. > restore is writing to the current directory (/target) and is reading > from stdin. But what does that mean? But ad2s1a has just been newfs'd - so how can it be dumped if its been formatted? And what exactly does stdout mean? What is dump doing? outputting what to where exactly? I don't see it or should I say, understand this at all.and then the restore is from what to where? > >> Could someone clarify all this for me? >> So far, I have been unable to dump the / slice, not even with the -L >> option. > > It's hard to help without knowing the exact commands you are using and > the errors they are producing. Help us to help you by posting them. > >> I am trying to dump the whole system (all the slices)except swap >> to a usb (sata2 500gb disk) and then restore to another computer with >> 7.2 minimal installation. > > A minimal install makes it easier. You don't need to copy /tmp, either. > >> Slices ad2s1d,e,f and g dump ok to usb. a does not - errors ("should use >> -L when dumping live filesystems) > > Right. So what happens when you use -L? "write error 10 blocks into volume 1 do you want to restart:" The first time I tried with -L the error was 20 blocks... Both the slices for dump from and to are same size (2gb) and certainly not full by a long shot ( if I reccall correctly, only about 14% is used) > A long pause while the system makes a snapshot is normal. And what's this about a snapshot? AFAIK, I'm not making a snapshot; anyway, there is no long pause except for the dumb look on my face upon seeing these messages. As it is, I am currently erasing the brand new 500gb disk on which I want to restore. Things started out really bad... don't u;nderstand what is going on. I installed a minimal 7.2, booted up and turned to another computer to do some serious work. About 2 hours and 49 minutes later I notice messages on the 7.2 about a page fault or something like that and then the system reboots. Obviously with errors... but then I reboot again and it comes up... I tried som copying from another disk and ended up with the disk all screwed up... yet the Seagate Seatools for Dos doesnt find any errors on it; Partition magic found an error but couldn't fix it, so now Im wiping the whole thing and will try to reinstall tomorrow. Doesn't make sense. > >> Do you have to newfs each slice before restoring? > > The first time. But your minimal install already did that for you. > >> But if you are restoring on a running 7.2 system, don't you have to >> restore to another disk than the one the system is on? > > Nope. You can overwrite the running system. I restore in /usr, /var, > and then / order. Then reboot and you are running the new clone. > >> I am beginning to think that you have to have a system running and >> dumpt to another disk on that system and then remove that disk and >> install in another box and boot from that? Am I getting close? I know >> it's a lot to ask, but then, I know you guys are capable... :-) > > It's usually best to limit messages to a single question. Sure, I agree... but when things are really complicated... I, at least, don't know how to separate them when they are quite interdependent. Thanks for responding.