From owner-freebsd-questions@FreeBSD.ORG Sun Apr 18 14:10:18 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 5059B106566C for ; Sun, 18 Apr 2010 14:10:18 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 1092B8FC13 for ; Sun, 18 Apr 2010 14:10:17 +0000 (UTC) Received: from r55.edvax.de (port-92-195-212-106.dynamic.qsc.de [92.195.212.106]) by mx01.qsc.de (Postfix) with ESMTP id 413553DC34; Sun, 18 Apr 2010 16:10:16 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o3IEAF0C002516; Sun, 18 Apr 2010 16:10:15 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 18 Apr 2010 16:10:15 +0200 From: Polytropon To: "J.D. Bronson" Message-Id: <20100418161015.f20206f0.freebsd@edvax.de> In-Reply-To: <4BCB07C0.8010305@sbcglobal.net> References: <4BCB07C0.8010305@sbcglobal.net> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Backing up freebsd to 1 file? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2010 14:10:18 -0000 On Sun, 18 Apr 2010 08:23:12 -0500, "J.D. Bronson" wrote: > I have a freebsd 8.0 install and was wondering if it is possible to tar > up the entire install...for backup purposes. > > # cd / > # tar -cvf backup.tar {list of directories} > > then I can ftp the tar file out to another machine. > > This works in theory, but if I need to do a restore tar complains > on 'tar -xpf backup.tar'. In this case, you're better using dump partition-wise, or just use dd to copy the whole disk - this may lead to large files, so adding compression is often useful. > Under OpenBSD, this works as expected. It has given me an easy way > to backup/move/restore or anything I want to do w/o complaining. What exact complains are output by FreeBSD's tar? > I am running Freebsd on a machine that has no other drives/tapes or > anything so my options for backup are limited. Note that dumping / restoring (especially restoring) is more easy to be done by booting from a live system (e. g. via CD, DVD or USB). > All I am trying to do is get a complete image (or snapshot) of my entire > install on this machine and then if I needed to reload or reinstall, I > could do a bare bones freebsd install, copy over the tar'd up file and > extract it from within / and then reboot an I would be go to go. Well... tar is not so good suited for that. There are things at file system level that are important to the system, but are not honored by the tar utility. In this case, dump + restore provide excellent means for what you're intending. In case of a failure, use a FreeBSD boot medium with sysinstall or sade to prepare the disk (slice, partition, newfs), then restore the dump files to the partitions, reboot, and it's done. Of course, dd provides an exact 1:1 copy, and you can choose to copy partitions, slices, or a whole disk. The dump and restore programs operate on file systems (partitions), while tar operates on files. > Thoughts on this would be appreciated... There are some threads in the archives about how to backup or clone a whole system. You'll find some more inspirations and considerations there. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...