From owner-freebsd-questions@FreeBSD.ORG Tue Apr 30 09:17:19 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D555339D for ; Tue, 30 Apr 2013 09:17:19 +0000 (UTC) (envelope-from sam.gh1986@gmail.com) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by mx1.freebsd.org (Postfix) with ESMTP id 60909148A for ; Tue, 30 Apr 2013 09:17:19 +0000 (UTC) Received: by mail-lb0-f176.google.com with SMTP id p10so308860lbv.35 for ; Tue, 30 Apr 2013 02:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=D3VjUXpfZo0B7GGOmflvmDNH49UbmQd60m/rHs8d5hU=; b=sh2cr1RXJnIp4yu1qsCkR36D2I9E5IxNVf1x7ZDrsSlo5AMNfXY81Kc5BbXyMl981b 91yjgrBdortwqlapJqEpGWBgqqo0Rh/cOOiG3rRbwAXtokCRrbVvtftG9WBRggUm+Qwr v9cUxGES+jdi3zlzUUBgNWwt7XMeKsdmpTVUK1/H1dQ4yUJWGX2pBNPxqEDwGrd8reJS icxo3ugkQnFKK8YzVRR/jpDqrUxvqfGbpmVb3YliLE1M7UTVUiwuIoXpcPXErCp96Vky /V+LTzvR6pSRzJKmf/6cj0DPMWXReIxEQtfv5brFNTwHTMDXpm4n1x9LqfuBu8nVjr8f An6Q== MIME-Version: 1.0 X-Received: by 10.152.112.231 with SMTP id it7mr28838549lab.10.1367313432230; Tue, 30 Apr 2013 02:17:12 -0700 (PDT) Received: by 10.112.163.130 with HTTP; Tue, 30 Apr 2013 02:17:12 -0700 (PDT) In-Reply-To: <44vc7cw2d8.fsf@lowell-desk.lan> References: <44vc7cw2d8.fsf@lowell-desk.lan> Date: Tue, 30 Apr 2013 13:47:12 +0430 Message-ID: Subject: Re: restore /usr dump on two hard disk parallel y From: s m To: freebsd-questions Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 09:17:19 -0000 thanks Lowell for your reply, i want to restore my /usr dump on both of my disks (each one has /usr partition separately). i try to use TMPDIR in order to prevent this conflict, but restore does not identify it and use my /tmp dir yet. this is what i do: first, i create a tmp1 directory in /tmp directory and set its permission to 777 second, i mount tmp1 into my hard disk number 1 i do these two steps for my hard disk number 2 (create tmp2 in tmp and mount it to hard disk number 2) moreover, this is my restore command: TMPDIR=/tmp/tmp2 restore rf /mnt/dumps/zrdump_usr.dump TMPDIR man page for restore command said: if you use -r option, it uses tmp files with unique name in /tmp directory. as you see, i am using -r in my restore command but conflict happens yet. please let me know how to use TMPDIR or any other solution to avoid conflict in /tmp directory. thanks in advance sam On Wed, Apr 24, 2013 at 4:46 PM, Lowell Gilbert < freebsd-questions-local@be-well.ilk.org> wrote: > s m writes: > > > i'm trying to restore DUMP file for partition /usr on tow hard disk > > parallel y. these two hard are connected to my system (i have > freebsd8.2). > > i use restore command and it uses /tmp directory to restore dump. in > > restoring dump process, two hard disks try to use /tmp directory of my > > system. therefore conflict happened and restore command return error. > > i try to use TMPDIR and define another tmp directory for one of my hard > > disk but it does not identify it and use my system tmp directory yet. > > please let me know if using TMPDIR is a good idea and how i can use it. > if > > not, how i can restore /usr dump file on two hard disk parallel y? > > What do you want to do exactly? > > Do you want both disks together to be your new /usr/partition? In that > case, you want to set up some kind of RAID system with the two > disks. Start with the GEOM section in the handbook. > > Do you want to end up with two partitions, each holding part of what the > /usr backup contains? If that's what you're after, then the best > approach is probably to pick one subdirectory of /usr (/usr/local would > be an obvious choice) and restore everything *but* that to one of your > disks, then mount the other disk on the subdirectory and restore the > rest onto there. > > If your problem is just that the two restore operations are stepping on > each other's temporary files, then TMPDIR *should* take care of > that. You could show us more detail of how you run the restore > operations, or just run them one at a time instead of in parallel. > > I hope that helps. >