From owner-freebsd-questions@FreeBSD.ORG Fri Sep 30 13:41:32 2011 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 4D6E4106566B for ; Fri, 30 Sep 2011 13:41:32 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id DF24A8FC1A for ; Fri, 30 Sep 2011 13:41:31 +0000 (UTC) Received: by wwe3 with SMTP id 3so2551267wwe.31 for ; Fri, 30 Sep 2011 06:41:31 -0700 (PDT) Received: by 10.227.72.200 with SMTP id n8mr321875wbj.19.1317390090190; Fri, 30 Sep 2011 06:41:30 -0700 (PDT) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id i29sm9182796wbp.22.2011.09.30.06.41.27 (version=SSLv3 cipher=OTHER); Fri, 30 Sep 2011 06:41:28 -0700 (PDT) Message-ID: <4E85C706.9000809@my.gd> Date: Fri, 30 Sep 2011 15:41:26 +0200 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20110922 Thunderbird/7.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <1511250858.20110929223638@yandex.ru> <20110929200920.GB46979@gizmo.acns.msu.edu> In-Reply-To: <20110929200920.GB46979@gizmo.acns.msu.edu> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: dump/restore, how to reduce slice size 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: Fri, 30 Sep 2011 13:41:32 -0000 On 9/29/11 10:09 PM, Jerry McAllister wrote: > On Thu, Sep 29, 2011 at 10:36:38PM +0300, ??????? ??????? wrote: > >> Hi, Freebsd-questions. >> >> # df -h >> Filesystem Size Used Avail Capacity Mounted on >> /dev/ad4s1a 2G 206M 1.6G 11% / >> devfs 1.0k 1.0k 0B 100% /dev >> /dev/ad4s1e 3.9G 13M 3.6G 0% /tmp >> /dev/ad4s1f 40G 25G 12G 67% /usr >> /dev/ad4s1d 31G 3.6G 24G 13% /var >> procfs 4.0k 4.0k 0B 100% /proc >> /dev/ad2s1f 39G 25G 10G 71% /mnt >> devfs 1.0k 1.0k 0B 100% /var/named/dev >> >> >> as you can see /dev/ad4s1f is 40G and /dev/ad2s1f is 39G >> but on ad4s1f only 25G used. >> >> How can I dump /dev/ad4s1f and restore it on /dev/ad2s1f? >> >> These commands: >> #mount /dev/ad2s1f /mnt >> #cd /mnt >> #dump -0Lf - /usr | restore -rf - >> does not help, because of ad2s1f does not have space to restore >> 'end of ' /dev/ad4s1f. >> >> May help any? > > Well, you are going to have difficulty putting 50 GB on a 39 GB partition. > (25GB + 25GB = 50GB). > It won't work. > > You could try compressing the dump, but dump files do not tend > to compress well and even if you got a 50% compression, you would > still be really close to overfill. > > Probably you need to go to the store and get a nice big USB drive > and slice and partition it in to a bunch of 50 GB partitions and > pipe your dump to a restore in those partitions on that drive. > You can round-robin your backups to those USB partitions. > > My backup to a USB hard drive just saved me the beginning of > this week when the old machine died of heat prostration. > Dump is supposed to take only the used space. @OP, refer the following link for correct dump/restore syntax: http://www.wonkity.com/~wblock/docs/html/backup.html#_tt_dump_tt_with_compression