From owner-freebsd-questions@FreeBSD.ORG Sun Apr 18 14:46:14 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1576106564A for ; Sun, 18 Apr 2010 14:46:14 +0000 (UTC) (envelope-from utisoft@googlemail.com) Received: from mail-bw0-f214.google.com (mail-bw0-f214.google.com [209.85.218.214]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1B48FC0A for ; Sun, 18 Apr 2010 14:46:14 +0000 (UTC) Received: by mail-bw0-f214.google.com with SMTP id 6so3384080bwz.13 for ; Sun, 18 Apr 2010 07:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=A1URjsHiTQ68n83xlz3CU/oZPz9yoVoOz7kriWhyMaQ=; b=tlKwo26dog0IRp6q+Rjogs5utVMcu2DYdbMgqye0fkL8lmDvwOM7r84kxJK7GiISg7 +n0T6t6CftllIaRnN0wZEDZ1CNg4ZAZDQxBw9nfP6ZWzci9jzGpW1Leeaz+aizFZkg5+ 7ddu4ZiQH/dM4yX18gcdZBy2cHH4cBPTyQZ0A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=lTSs4pW26eWQrMei55mHOLrOt5NDOoeln4xD8CtXlwGgxD6Q337pOAoqXpOPdyDpcq xpq4nII4u9PMblRd8sU+zLO3WwtIC0+lXXfzopKH7K29xeC5mjMzHp5GIz4pms49lgT2 5Fzu9cimLeAeX9b3Is7ictJFshJvD4u2L5nuI= MIME-Version: 1.0 Received: by 10.204.66.6 with HTTP; Sun, 18 Apr 2010 07:45:42 -0700 (PDT) In-Reply-To: <1271601423.1287.15.camel@localhost> References: <4BCB07C0.8010305@sbcglobal.net> <20100418161015.f20206f0.freebsd@edvax.de> <1271601423.1287.15.camel@localhost> From: Chris Rees Date: Sun, 18 Apr 2010 15:45:42 +0100 Received: by 10.204.7.82 with SMTP id c18mr3659202bkc.97.1271601972254; Sun, 18 Apr 2010 07:46:12 -0700 (PDT) Message-ID: To: freebsd-questions Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: jd_bronson@sbcglobal.net Subject: Re: Backing up freebsd to 1 file? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2010 14:46:15 -0000 On 18 April 2010 15:37, Sergio de Almeida Lenzi wr= ote: > I am very happy with the folowing.... > > > Supose that you have mount ANOTHER device on /mnt.... > > 1) mount /dev/xxxx /mnt > 2) init 1 =A0(this closes all applications and drop into single user) > 3) tar --one-file-system -cvzf /mnt/backup.tar.gz ./ var usr home > 4) umount /mnt > 5) exit (reboot from single user to normal operation) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > on restore....... > supose you install a FBSD minimal from the CD/usb..... > > 1) mount /dev/xxxx /mnt > 2) tar -xpvf /mnt/backup.tar.gz -C / > ........................ > 3) umount /mnt > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dyou have restored your system=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > may be some files (sockets...) are not restored but no problem as > they will be created by the time your system boots on. Nice answer by Sergio, but I personally would use the j option with tar to compress to bzip2; 3) tar --one-file-system -cvjf /mnt/backup.tbz ./ var usr home Though I prefer personally to use dump/restore because: - If you're on UFS, you don't have to single-user the system, just use the L option (live filesystem) - Restore has an awesome 'interactive' mode - See Zwicky [1] I'll send you my dump scripts if you're interested. It's dead easy to use! Chris [1] http://www.coredumps.de/doc/dump/zwicky/testdump.doc.html