From owner-freebsd-questions@FreeBSD.ORG Mon Jan 4 22:03:44 2010 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 92B141065670 for ; Mon, 4 Jan 2010 22:03:44 +0000 (UTC) (envelope-from bsd@todoo.biz) Received: from newmail.rmm.fr (newmail.rmm.fr [87.98.206.99]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5338FC18 for ; Mon, 4 Jan 2010 22:03:44 +0000 (UTC) Received: from newmail.rmm.fr (localhost [127.0.0.1]) by newmail.rmm.fr (Postfix) with ESMTP id 6147F5470; Mon, 4 Jan 2010 23:03:57 +0100 (CET) X-Virus-Scanned: amavisd-new 2.6.4 (20090625) at rmm.fr Received: from newmail.rmm.fr ([127.0.0.1]) by newmail.rmm.fr (newmail.rmm.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M7QM7KtmAppx; Mon, 4 Jan 2010 23:03:57 +0100 (CET) Received: from newmail.rmm.fr (newmail.rmm.fr [87.98.206.99]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: hidden) by newmail.rmm.fr (Postfix) with ESMTPSA id C7E6C5467 ; Mon, 4 Jan 2010 23:03:56 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=windows-1252 From: bsd In-Reply-To: <20100104213629.GA1136@gizmo.acns.msu.edu> Date: Mon, 4 Jan 2010 23:03:41 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4F9E0B10-F8FB-41BE-8D59-00B29094CCC3@todoo.biz> <20100104185617.GA96455@gizmo.acns.msu.edu> <20100104213629.GA1136@gizmo.acns.msu.edu> To: Jerry McAllister X-Mailer: Apple Mail (2.1077) Cc: Liste FreeBSD Subject: Re: Restoreing Dump on FreeBSD headless server 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: Mon, 04 Jan 2010 22:03:44 -0000 Le 4 janv. 2010 =E0 22:36, Jerry McAllister a =E9crit : > On Mon, Jan 04, 2010 at 08:42:33PM +0100, bsd wrote: >=20 >>=20 >> Le 4 janv. 2010 =E0 19:56, Jerry McAllister a =E9crit : >>=20 >>> On Mon, Jan 04, 2010 at 07:08:51PM +0100, bsd wrote: >>>=20 >>>> Hello folks,=20 >>>>=20 >>>>=20 >>>> I would like to know how to proceed in order to restore a dump from = a=20 >>>> backup headless server (remotely using ssh).=20 >>>=20 >>>> How am I supposed to proceed, should I first install the server (a = FreeBSD=20 >>>> Fresh install with spare partition) then restore the dump on an = empty=20 >>>> partition ? =20 >>>=20 >>> Depends on what you have and what you want to restore. >>> Is the reason for the restore because the old disk went belly up? >>> Or did you just nuke some stuff accidently. Is the restore the >>> boot disk or an extra work disk? =20 >>=20 >> Well, to tell you the truth: I am using a remote backup solution = since 2.5=20 >> years and the provider has just told me that he would no longer = support=20 >> my hardware so I need to rebuild a new server based on my previous = config >=20 > I am not clear on what you mean by a 'remote backup solution' - do you > mean that you are using dump(8) but writing to some remote device or > do you mean you are using some '3rd party' backup software/hardware > that your provider/hoster is supplying? I am using dump(8).=20 I have successfully created a backup of all major partition of my server = which is now secured on a remote HD.=20 >=20 >=20 >>> In the first case, yes you will need to create something on the disk = -=20 >>> some sort of filesystem. Probably that would mean using a fixit >>> image to boot and do an fdisk(8), bsdlabel(8) and newfs(8). =20 >>=20 >=20 >> Ok, I think the server I will install that on might use some sort of=20= >> virtual KVM that could allow me to do that >=20 > Well, that could be helpful. It should give you a console type = access > which is convenient in installation situations. Does that 'KVM'=20 > supply the backup device too, or talk to it directly? I haven't tried It so I don't know what functionnality It offers=85=20 But I guess I might start a fresh install from that console=85=20 At which point should I do the restore(8) in the install process ?=20 >=20 >>>=20 >>> It the second case, the filesystem[s] is[are] still intact and you >>> only need to do an 'interactive' restore of just the files you want. >>> IF you are doing an intereactive restore and if you have room, it = may=20 >>> be easiest to copy the whole dump file over to some big space on the=20= >>> system and run the restore from that copy. Then you can just ssh in=20= >>> and run it just as if it was setting beside you. >>>=20 >>> The same might not be true if you are replacing a destroyed disk=20 >>> because the restore will be a complete one and no file selecting >>> will be necessary. >>>=20 >>> If you cannot get physical contact with the machine, and the disk = was >>> damaged and replaced, you may have to learn how to do a network boot=20= >>> and install. I have never had to do that so am not a good one to = guide=20 >>> that process. =20 >>=20 >=20 >> Well my idea was to rebuild the new server based on the dump I have=20= >> realised (in order to save me the time to do the reinstall).=20 >> But from what you are telling me It might not be so easy >=20 > I am not clear again just what you are meaning by 'based on the dump > I have realised'. Do you mean that you would keep the filesystem > structure you have already? IS there a dump file/tape for each > filesystem in the old system? =20 Dump is stored on a remote HD.=20 There is one dump file per partition (not for /tmp).=20 >=20 > If that is what you mean, good. There is no harm in keeping the > old filesystem structure if it was working for you. Take a look > at how much is used in each filesystem and think if you need to > change the size. But, that is just a detail of sizing the partitions > and not a critical structure consideration. If the new system has > larger disk, then you can make use of it just by making bigger=20 > partitions where they are needed. Ok.=20 >=20 >=20 >>>=20 >>> In either case of having to create slices, partitions and = filesystems, >>> you do not have to do a complete system install. You need to do = just >>> enough building to have the filesystems created and mountable. >>=20 >> Yes but how should I partition that ?=20 >>=20 >> Should I re-create the=20 >>=20 >> / >> /var >> /usr >> /tmp >>=20 >> or=20 >>=20 >> / with minimal system >>=20 >> and re-create the mapping with nothing on slice.=20 >=20 > Create what you want it to be and go from there unless the old and > the new structure are incompatible in some way. My usual set of > partitions/filesystems are: >=20 > / > swap > /tmp > /usr > /var > /home or other convenient name such as /bighome > /work if there is a lot of extra space on the new disk and > you don't want it clumped in with the rest for some reason. > I usually put all the rest in that /bighome filesystem. > If I have an extra disk with lots of space, I make that /work >=20 >=20 > But, if your structure is working for you, stick with it. >=20 >>=20 >>=20 >>> The fixit >>> is just fine for that. If you can get that going remotely, then >>> do the fdisk, bsdlabel and newfs-s from that and then restore from=20= >>> the dump to the new filesystems. =20 >>=20 >> Ok, that should be the good path >>=20 >=20 > Yes, unless you are changing the structure (not size, but organization > of the filesystems) just make the partitions and newfs them and = resture > the dumps to them. =20 >=20 >>=20 >>> Forget about doing a real install. >>>=20 >>>>=20 >>>> Should the new empty partition be the exact same size as the dumped=20= >>>> partition ?=20 >>>=20 >>> It just has to be large enough to hold what you restore. >>> In fact, it is a good time to increase or adjust filesystem sizes if >>> you have more room on the replacement disk. >>=20 >> Good >>=20 >=20 > That is the advantage of using dump/restore for your backups. It is > agnostic to the size of the partition as long as there is enough room > to hold things. Something like dd(1) which is great for some things > forces you to stick with the exact sector complement and so isn't > really a good backup tool. >=20 > One thing to consider, if you are copying from an old machine > to a new one is to create the slice/partitions/filesystems and > then use rsync to move the files from the old machine to the > new one. It is quite efficient if both machines are available > to be running at the same time. But, if you have to work from a > backup file or tape somewhere, then that is not a good option. Ok Thank you very much Jerry.=20 As both filesystem are going to be up and running at the same time, I = guess It will be quite easy to do this operation=85=20 Even if I have to crash couple of system on the new machine, that = shouldn't be a problem -- after all It is by experimenting that we all = progress!=20 I'll maybe do a follow-up on the thread if I have problem somewhere = during the operation (It shouldn't take place until one week)=85=20 Thanks.=20 >=20 > ////jerry >=20 >=20 >=20 >>>=20 >>>>=20 >>>> Is there a tool that could allow me to restore remotely ?=20 >>>>=20 >>>=20 >>> You can use rsh(1). I have done that. =20 >>> Probably some specific ssh method too, but I am so old I haven't >>> done one with that new fangled secure ssh yet... >>=20 >> Ok.=20 >>=20 >>=20 >> Thanks.=20 >>=20 >>>=20 >>> ////jerry =20 >>>=20 >>>=20 >>>>=20 >>>> Any advice or howto will be (very) welcome.=20 >>>>=20 >>>>=20 >>>> Thanks.=20 >>>>=20 >>>>=20 >>>> P.S. Happy new BSD year !!=20 >>>>=20 >>>>=20 >>>> =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= >>>> Gregober ---> PGP ID --> 0x1BA3C2FD >>>> bsd @at@ todoo.biz >>>> =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= >>>>=20 >>>> P "Please consider your environmental responsibility before = printing this e-mail" >>>>=20 >>>>=20 >>>> _______________________________________________ >>>> freebsd-questions@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>>> To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org" >>>>=20 >>=20 >> =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF >> Gregober ---> PGP ID --> 0x1BA3C2FD >> bsd @at@ todoo.biz >> =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF >>=20 >> P "Please consider your environmental responsibility before printing = this e-mail" >>=20 >>=20 >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org" >>=20 =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF Gregober ---> PGP ID --> 0x1BA3C2FD bsd @at@ todoo.biz =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF= =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF P "Please consider your environmental responsibility before printing = this e-mail"