Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Gary Aitken
> did the following:
>booted to backup disk
>dump -0aR -h 0 -f /usr/backup/dump_var_0_20121113_1920 /dev/ada0p4
>(repeat for /tmp, /usr, / partitions to be safe)
>repartitioned the main disk using gpart
>newfs the modified partitions (var, tmp, usr)
>rewrote the boot block and boot partition (#1)
>mount /dev/ada0p4 /mnt/ssd/var
>cd /mnt/ssd/var
>restore -r /usr/backup/dump_var_0_20121113_1920
>Cannot find file dump list

ok, after digging around in my notes and memory I have a better understanding
of what actually happened:

I went through several reboot sequences, between the backup disk and
the main disk.

After generating the /var dump file on the backup disk while booted from the
backup disk, I did a shutdown -r to reboot the main disk; can't remember why.
What I do remember is that the dump itself, running as root from ttyv5, 
appeared to terminate normally, with no error message; I got the # prompt.
However, as the shutdown was happening, I saw the message:
  Dump failed, partition too small
on ttyv1 -- despite the fact that the command completed without any message
on the controlling terminal, ttyv5.

The destination file-system was nowhere near full, and the source was read-only,
so I stupidly assumed the output was ok and the message was the result of
some other niggly thing.

Obviously dump ran out of space (the file is exactly a multiple 
of the block size and apparently truncated), and the dump directory can't be 
found.  But where it ran out of space is unclear to me, as the destination 
file system was nowhere near full before or after the event, and contains
two much larger intact dump sets (for / and /usr) and one of those was 
written after the truncated ones.

The question I have is:
  Why didn't the dump failure message show up on the controlling terminal? 
 
It's not clear which partition ran out of space.  Does dump use /tmp or /var?  
/tmp and /var on the running backup os are relative small (512MB), and the 
filesystem being dumped was the same size and ~70% full.  If dump uses /tmp 
and tmp runs out of space and the tty output of dump is depending on a socket 
in /tmp, that might cause a problem.  But once the process terminates, if it 
cleans up after itself there's no trace of the overflow.

crazy?  it was kinda late at night...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Warren Block

On Wed, 14 Nov 2012, Matthias Apitz wrote:


El día Wednesday, November 14, 2012 a las 09:45:22AM -0700, Warren Block 
escribió:


One of the (in my opinion) most interesting reference sources
for dump/restore also mentions this format:

# mount /dev/da0s1 /mnt
# mkdir /tmp/oldvar
# cd /tmp/oldvar
# restore -ruf /mnt/var.dump


Yes, -u "unlinks" an existing file before restoring that file, useful
for restoring dumps over an existing filesystem.  Leave out the -u when
restoring to a new filesystem and the restore will go faster.


# umount /mnt


And that points out a mistake: /mnt can't be unmounted while it is the
PWD.  Fixed.


I think PWD is /tmp/oldvar and not /mnt;


Yes, you're correct.  Re-fixed.  Thanks!___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Matthias Apitz
El día Wednesday, November 14, 2012 a las 09:45:22AM -0700, Warren Block 
escribió:

> > One of the (in my opinion) most interesting reference sources
> > for dump/restore also mentions this format:
> >
> > # mount /dev/da0s1 /mnt
> > # mkdir /tmp/oldvar
> > # cd /tmp/oldvar
> > # restore -ruf /mnt/var.dump
> 
> Yes, -u "unlinks" an existing file before restoring that file, useful 
> for restoring dumps over an existing filesystem.  Leave out the -u when 
> restoring to a new filesystem and the restore will go faster.
> 
> > # umount /mnt
> 
> And that points out a mistake: /mnt can't be unmounted while it is the 
> PWD.  Fixed.

I think PWD is /tmp/oldvar and not /mnt;

matthias
-- 
Sent from my FreeBSD netbook

Matthias Apitz   |  - No system with backdoors like Apple/Android
E-mail: g...@unixarea.de |  - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |  - No proprietary attachments
phone: +49-170-4527211   |  - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Warren Block

On Wed, 14 Nov 2012, Polytropon wrote:


On Wed, 14 Nov 2012 01:01:08 -0800 (PST), Jack Mc Lauren wrote:

There is no - . This is the correct format : restore rf /path/to/dump/files


Really? The manual at "man restore" mentions:

restore -r [-dDNuvy] [-b blocksize] [-f file | -P pipecommand]
[-s fileno]

And in the -r section:

  newfs /dev/da0s1a
  mount /dev/da0s1a /mnt
  cd /mnt

  restore rf /dev/sa0

So it seems that _both_ formats are supported (comparable to
tar).

One of the (in my opinion) most interesting reference sources
for dump/restore also mentions this format:

# mount /dev/da0s1 /mnt
# mkdir /tmp/oldvar
# cd /tmp/oldvar
# restore -ruf /mnt/var.dump


Yes, -u "unlinks" an existing file before restoring that file, useful 
for restoring dumps over an existing filesystem.  Leave out the -u when 
restoring to a new filesystem and the restore will go faster.



# umount /mnt


And that points out a mistake: /mnt can't be unmounted while it is the 
PWD.  Fixed.



Source:

http://www.wonkity.com/~wblock/docs/html/backup.html#_em_dump_8_em_em_restore_8_em


Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Gary Aitken
On 11/14/12 01:30, Matthias Apitz wrote:
> El día Wednesday, November 14, 2012 a las 01:20:14AM -0700, Gary Aitken 
> escribió:
> 
>> I needed to expand a /var partition,
>> which required saving and restoring /var and /usr
>>
>> did the following:
>>booted to backup disk
>>dump -0aR -h 0 -f /usr/backup/dump_var_0_20121113_1920 /dev/ada0p4
>>(repeat for /tmp, /usr, / partitions to be safe)
>>repartitioned the main disk using gpart
>>newfs the modified partitions (var, tmp, usr)
>>rewrote the boot block and boot partition (#1)
>>mount /dev/ada0p4 /mnt/ssd/var
>>cd /mnt/ssd/var
>>restore -r /usr/backup/dump_var_0_20121113_1920
>>Cannot find file dump list
>>
>> Any ideas why I get the "Cannot find file dump list"?
>> What / where is it supposed to be?
> 
> You need to specify the file containing the DUMP with -f flag; and use
> the flag -r only to restore to the original location, or -x to restore
> into the current dir; check the man page for details;

Sorry all, a typing issue on my part when composing the email; problem remains:

# restore -iN -f /mnt/hd_ssd_backup/usr/backup/dump_tmp_0_20121113_1920
Cannot find file dump list

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Polytropon
On Wed, 14 Nov 2012 01:01:08 -0800 (PST), Jack Mc Lauren wrote:
> There is no - . This is the correct format : restore rf /path/to/dump/files

Really? The manual at "man restore" mentions:

 restore -r [-dDNuvy] [-b blocksize] [-f file | -P pipecommand]
 [-s fileno]

And in the -r section:

   newfs /dev/da0s1a
   mount /dev/da0s1a /mnt
   cd /mnt

   restore rf /dev/sa0

So it seems that _both_ formats are supported (comparable to
tar).

One of the (in my opinion) most interesting reference sources
for dump/restore also mentions this format:

# mount /dev/da0s1 /mnt
# mkdir /tmp/oldvar
# cd /tmp/oldvar
# restore -ruf /mnt/var.dump
# umount /mnt

Source:

http://www.wonkity.com/~wblock/docs/html/backup.html#_em_dump_8_em_em_restore_8_em



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Matthias Apitz
El día Wednesday, November 14, 2012 a las 01:01:08AM -0800, Jack Mc Lauren 
escribió:

> Hi
> There is no - . This is the correct format : restore rf /path/to/dump/files

from man restore(8):

RESTORE(8)  FreeBSD System Manager's Manual
RESTORE(8)

NAME
 restore, rrestore — restore files or file systems from backups made
with
 dump

SYNOPSIS
 restore -i [-dDhmNuvy] [-b blocksize] [-f file | -P pipecommand]
 [-s fileno]
 restore -R [-dDNuvy] [-b blocksize] [-f file | -P pipecommand]
 [-s fileno]
 restore -r [-dDNuvy] [-b blocksize] [-f file | -P pipecommand]
 [-s fileno]
 restore -t [-dDhNuvy] [-b blocksize] [-f file | -P pipecommand]
 [-s fileno] [file ...]
 restore -x [-dDhmNuvy] [-b blocksize] [-f file | -P pipecommand]
 [-s fileno] [file ...]

...

matthias

-- 
Sent from my FreeBSD netbook

Matthias Apitz   |  - No system with backdoors like Apple/Android
E-mail: g...@unixarea.de |  - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |  - No proprietary attachments
phone: +49-170-4527211   |  - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Jack Mc Lauren





 From: Polytropon 
To: free...@dreamchaser.org 
Cc: FreeBSD Mailing List  
Sent: Wednesday, November 14, 2012 12:27 PM
Subject: Re: ugh.  dump / restore problem(s) "Cannot find file dump list"
 
On Wed, 14 Nov 2012 01:20:14 -0700, Gary Aitken wrote:
>   mount /dev/ada0p4 /mnt/ssd/var
>   cd /mnt/ssd/var
>   restore -r /usr/backup/dump_var_0_20121113_1920
>   Cannot find file dump list

>>The last command looks wrong. The restore program requires
>>the dump file to be provided via -f, so
>>
>>    # restore -rf /usr/backup/dump_var_0_20121113_1920
>>
>>should work. You can find an example in "man restore".


Hi
There is no - . This is the correct format : restore rf /path/to/dump/files

good luck :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Polytropon
On Wed, 14 Nov 2012 01:20:14 -0700, Gary Aitken wrote:
>   mount /dev/ada0p4 /mnt/ssd/var
>   cd /mnt/ssd/var
>   restore -r /usr/backup/dump_var_0_20121113_1920
>   Cannot find file dump list

The last command looks wrong. The restore program requires
the dump file to be provided via -f, so

# restore -rf /usr/backup/dump_var_0_20121113_1920

should work. You can find an example in "man restore".



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Matthias Apitz
El día Wednesday, November 14, 2012 a las 01:20:14AM -0700, Gary Aitken 
escribió:

> I needed to expand a /var partition, 
> which required saving and restoring /var and /usr
> 
> did the following:
>   booted to backup disk
>   dump -0aR -h 0 -f /usr/backup/dump_var_0_20121113_1920 /dev/ada0p4
>   (repeat for /tmp, /usr, / partitions to be safe)
>   repartitioned the main disk using gpart
>   newfs the modified partitions (var, tmp, usr)
>   rewrote the boot block and boot partition (#1)
>   mount /dev/ada0p4 /mnt/ssd/var
>   cd /mnt/ssd/var
>   restore -r /usr/backup/dump_var_0_20121113_1920
>   Cannot find file dump list
> 
> Any ideas why I get the "Cannot find file dump list"?
> What / where is it supposed to be?

You need to specify the file containing the DUMP with -f flag; and use
the flag -r only to restore to the original location, or -x to restore
into the current dir; check the man page for details;

matthias
-- 
Sent from my FreeBSD netbook

Matthias Apitz   |  - No system with backdoors like Apple/Android
E-mail: g...@unixarea.de |  - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |  - No proprietary attachments
phone: +49-170-4527211   |  - Respect for open standards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


ugh. dump / restore problem(s) "Cannot find file dump list"

2012-11-14 Thread Gary Aitken
I needed to expand a /var partition, 
which required saving and restoring /var and /usr

did the following:
  booted to backup disk
  dump -0aR -h 0 -f /usr/backup/dump_var_0_20121113_1920 /dev/ada0p4
  (repeat for /tmp, /usr, / partitions to be safe)
  repartitioned the main disk using gpart
  newfs the modified partitions (var, tmp, usr)
  rewrote the boot block and boot partition (#1)
  mount /dev/ada0p4 /mnt/ssd/var
  cd /mnt/ssd/var
  restore -r /usr/backup/dump_var_0_20121113_1920
  Cannot find file dump list

Any ideas why I get the "Cannot find file dump list"?
What / where is it supposed to be?

I was able to get some stuff back from one of the files,
but only by doing:

  #restore -if /usr/backup/dump_usr_0_201121113_1920
  restore > verbose
  restore > add libdata
  restore > extract
  Extract requested files
  You have not read any tapes yet
  If you are extracting just a few files, start with the last volume
  and work towards the first; restore can quickly skip tapes that
  have no further files to extract.  Otherwise, begin with volume 1.
  Specify next volume #: 1
  Mount tape volume 1
  Enter "none" if there are no more tapes
  otherwise enter tape name (default: /usr/backup/dump_usr_0_20121113_1920)
  unknown tape header type -2
  abort [yn] n
  resync restore, skipped 786 blocks
  extract file ...
...
  Add links
  Set directory mode, owner, and times.
  Set owner / mode for '.' [yn] y
  restore >

If I did not enter  after the "otherwise enter tape name",
but rather entered "none"
I did not get all of the desired contents.
  
Can anyone shed light on this problem?
I have been able to restore most everything from a cp I had done
at the same time, but I'm not very confident in the results.  
Fortunately, user data was on a different disk.

Obviously, should have done a
  restore -rN ...
before repartitioning.  Ugh.

Related question:
  I now realize I should not have answered "y" to the set owner / mode
question, as it changed the mode to the default for root instead of
doing what I thought which was restoring the owner / mode to what was
saved in the dump.  Will
  restore -x /usr/backup/dump...
correct the owner and mode? (and group and flags?)

Thanks,

Gary
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-05 Thread Ronald F. Guilmette

In message <20121105051447.6eef32ef.free...@edvax.de>, 
Polytropon  wrote:

>> >The problem is that delegating compression to a "sub-task" would
>> >imply that dump cannot precisely adjust its output to match the
>> >media size (as the limit is now defined by how good the compression
>> >works).
>> 
>> Correct.  We have both just said the exact same thing in different ways.
>> 
>> In order to have _compression_ of the dump data _and_ still be able to
>> divide the (post-compression) data into nice proper 2KB chunks (as required
>> for DVD+/-R writing) the compression step itself would need to be integrated
>> into the dump program itself (and then, for symmetry, if for no other
>> reason, into restore as well).
>
>Chunk size _and_ media size matter (as dump would have to "know"
>when the media is expected to be "nearly-full" _with_ compression)

Correct.

We are both still just violently agreeing.


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Robert Bonomi

> Date: Mon, 05 Nov 2012 15:42:45 +1000
> From: Da Rock 
> Subject: Re: Questions about dump/restore to/from DVD media
>
> On 11/05/12 14:14, Polytropon wrote:
> For reference, if one did backup the whole slice/disk using dd and then 
> compressed the data, would that effectively compress all those
> 'unallocated' nodes?

NO.  The unallocated' blocks still have whatever data was in them.

*IF* you copy /dev/zero to a new file, to fill the disk, then rm
-that- file, the compression will be higher.  'How much' depends on
how empty the disk is.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Da Rock
On 11/05/12 14:14, Polytropon wrote:
> On Sun, 04 Nov 2012 19:49:24 -0800, Ronald F. Guilmette wrote:
>> In message <20121105035233.e3c4ae8a.free...@edvax.de>, 
>> Polytropon  wrote:
>>
>>>> But as I said (above) to make this really work right, dump & restore really
>>>> need to have -z options, and do the zipping/unzipping internally.  Only
>>>> if this were available could dump properly deal with end-of-media on any
>>>> given output volume, I think.
>>> The problem is that delegating compression to a "sub-task" would
>>> imply that dump cannot precisely adjust its output to match the
>>> media size (as the limit is now defined by how good the compression
>>> works).
>> Correct.  We have both just said the exact same thing in different ways.
>>
>> In order to have _compression_ of the dump data _and_ still be able to
>> divide the (post-compression) data into nice proper 2KB chunks (as required
>> for DVD+/-R writing) the compression step itself would need to be integrated
>> into the dump program itself (and then, for symmetry, if for no other
>> reason, into restore as well).
> Chunk size _and_ media size matter (as dump would have to "know"
> when the media is expected to be "nearly-full" _with_ compression)
> because the operator will be required to deal with multi-volume
> media ("next DVD").
>
>
>
>>>> (I hate to say it, because in general I loath & despise Windows, but even
>>>> Windows has a built-in facility for making a single backup of an _entire_
>>>> system, and in a single step, *and*, I presume in a space-efficient 
>>>> manner.)
>>> That would be a task for dd. :-)
>> Sorry?  I am not following you.
>>
>> How could dd ever substitute for the intelligence of dump(8), and 
>> specifically
>> how could it avoid copying of blocks that are ``in'' the filesystem but which
>> are not currently _allocated_ by the filesystem?
> It cannot. :-)
>
> With dd, you could copy a disk including all aspects of the
> present slices and partitions (including file attributes and
> partitioning data, even boot elements), but it would maybe
> require a subsequent "read and compare" step to make sure
> that everything went well.
>
>
>
>> (I am also not persuaded the dd could handle multiple partitions any better
>> that dump(8) currently does... which is to say not at all, really.)
> It can - depending on what device you're reading from.
>
> Examples:
>
>   dd if=/dev/ad0s1a   -> the root partition
>   dd if=/dev/ad0s1-> the 1st slice
>   dd if=/dev/ad0  -> the whole disk
>
> However, dd is very much "bare metal" and cannot handle multiple
> volumes and compression natively. It would be neccessary to have
> all those functionalities scripted additionally.
For reference, if one did backup the whole slice/disk using dd and then
compressed the data, would that effectively compress all those
'unallocated' nodes?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Polytropon
On Sun, 04 Nov 2012 19:49:24 -0800, Ronald F. Guilmette wrote:
> 
> In message <20121105035233.e3c4ae8a.free...@edvax.de>, 
> Polytropon  wrote:
> 
> >> But as I said (above) to make this really work right, dump & restore really
> >> need to have -z options, and do the zipping/unzipping internally.  Only
> >> if this were available could dump properly deal with end-of-media on any
> >> given output volume, I think.
> >
> >The problem is that delegating compression to a "sub-task" would
> >imply that dump cannot precisely adjust its output to match the
> >media size (as the limit is now defined by how good the compression
> >works).
> 
> Correct.  We have both just said the exact same thing in different ways.
> 
> In order to have _compression_ of the dump data _and_ still be able to
> divide the (post-compression) data into nice proper 2KB chunks (as required
> for DVD+/-R writing) the compression step itself would need to be integrated
> into the dump program itself (and then, for symmetry, if for no other
> reason, into restore as well).

Chunk size _and_ media size matter (as dump would have to "know"
when the media is expected to be "nearly-full" _with_ compression)
because the operator will be required to deal with multi-volume
media ("next DVD").



> >> (I hate to say it, because in general I loath & despise Windows, but even
> >> Windows has a built-in facility for making a single backup of an _entire_
> >> system, and in a single step, *and*, I presume in a space-efficient 
> >> manner.)
> >
> >That would be a task for dd. :-)
> 
> Sorry?  I am not following you.
> 
> How could dd ever substitute for the intelligence of dump(8), and specifically
> how could it avoid copying of blocks that are ``in'' the filesystem but which
> are not currently _allocated_ by the filesystem?

It cannot. :-)

With dd, you could copy a disk including all aspects of the
present slices and partitions (including file attributes and
partitioning data, even boot elements), but it would maybe
require a subsequent "read and compare" step to make sure
that everything went well.



> (I am also not persuaded the dd could handle multiple partitions any better
> that dump(8) currently does... which is to say not at all, really.)

It can - depending on what device you're reading from.

Examples:

dd if=/dev/ad0s1a   -> the root partition
dd if=/dev/ad0s1-> the 1st slice
dd if=/dev/ad0  -> the whole disk

However, dd is very much "bare metal" and cannot handle multiple
volumes and compression natively. It would be neccessary to have
all those functionalities scripted additionally.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Ronald F. Guilmette

In message <20121105035233.e3c4ae8a.free...@edvax.de>, 
Polytropon  wrote:

>> But as I said (above) to make this really work right, dump & restore really
>> need to have -z options, and do the zipping/unzipping internally.  Only
>> if this were available could dump properly deal with end-of-media on any
>> given output volume, I think.
>
>The problem is that delegating compression to a "sub-task" would
>imply that dump cannot precisely adjust its output to match the
>media size (as the limit is now defined by how good the compression
>works).

Correct.  We have both just said the exact same thing in different ways.

In order to have _compression_ of the dump data _and_ still be able to
divide the (post-compression) data into nice proper 2KB chunks (as required
for DVD+/-R writing) the compression step itself would need to be integrated
into the dump program itself (and then, for symmetry, if for no other
reason, into restore as well).

>Using dump + restore
>means to operate on partitions. Make the system one partition - deal
>with one partition. Make many partitions - need to deal with them
>individually.

Good point.

>> (I hate to say it, because in general I loath & despise Windows, but even
>> Windows has a built-in facility for making a single backup of an _entire_
>> system, and in a single step, *and*, I presume in a space-efficient manner.)
>
>That would be a task for dd. :-)

Sorry?  I am not following you.

How could dd ever substitute for the intelligence of dump(8), and specifically
how could it avoid copying of blocks that are ``in'' the filesystem but which
are not currently _allocated_ by the filesystem?

(I am also not persuaded the dd could handle multiple partitions any better
that dump(8) currently does... which is to say not at all, really.)


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Ronald F. Guilmette

In message <50971b88.40...@herveybayaustralia.com.au>, 
Da Rock  wrote:

>Also, you may have considered this already (or not :) ), but you are
>using a direct write to backup your system, and then considering
>compression on top of that. CD/DVD filesystems incorporate some parity
>to allow for defects and scratches, so growisofs might be best to use to
>ensure some integrity to your data.
>
>Minimising your space may be good, but a single bit could render all
>your efforts for nought- especially given the compression leaves no room
>for error ;)

I'm not sure if the error detection/correction on DVDs... either -Rs
or +Rs... is a function of the _filesystem_.  In fact I don't believe
that it is, but I could be wrong.

Google for this:

DVD+R error correction

and there are plenty of references.  The ones that I read in the past
seemed to suggest that the error detection/correction is a fundamental
aspect of how data gets written to both -R and +R disks, totally independent
of whether the data being written was organized into any type of filesystem
or none at all.

In fact, part of the reason that I only use DVD+Rs these days is because
I read something that said that something like 1/4 of every block of data
on DVD-R disks is not even covered by any error correction code AT ALL.

Ah, yes... here is one such reference:

 http://adterrasperaspera.com/blog/2006/10/30/how-to-choose-cddvd-archival-media

"The DVD-R specification states that for every 192 bits, 64 of them are
not protected under any scheme, 24 of them are protected by 24 bits of
parity, and the last 56 bits are protected by another 24 bits of parity.
This weird (to put it mildly) scheme allows you to easily scramble or
lose 25% of the data that is required to read your disk! This information
is almost more important than the actual data burned on the disc itself.

The DVD+R specification, however, states that for every 204 bits of
information, it is split into four blocks of 52 bits containing 1 sync
bit to prevent misreading because of phase changes, 31 bits of data,
and a 20 bit parity (that protects all 32 bits of data)..."


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Polytropon
On Sun, 04 Nov 2012 18:37:43 -0800, Ronald F. Guilmette wrote:
> 
> In message <20121105021817.fc5bff1b.free...@edvax.de>, 
> Polytropon  wrote:
> 
> >> I would like to make this backup to a _minimal_ number of DVD+R disks.
> >
> >If you think you can add compression to your files (if it makes
> >sense), it should be incorporated to the command.
> 
> Yes.  There really ought to be a -z option integrated into both dump and
> restore commands.

Depending on _what_ kind of compression (gzip, bzip2, 7zip, xz etc.)
there might be many of them. If utilizing the capabilities of
libarchive is possible, it would be a nice option.



> >> Another issue is that I most definitely want to use an absolute minimum...
> >
> >Taking the initial approach of
> >
> >/sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u
> >
> >it could be something like this:
> >
> >/sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | growisofs -Z /dev/cd0=-' /u
> 
> Yes.  I see.  That makes sense.
> 
> But as I said (above) to make this really work right, dump & restore really
> need to have -z options, and do the zipping/unzipping internally.  Only
> if this were available could dump properly deal with end-of-media on any
> given output volume, I think.

The problem is that delegating compression to a "sub-task" would
imply that dump cannot precisely adjust its output to match the
media size (as the limit is now defined by how good the compression
works). Instead an additional step would be required to make sure
that a new media for the _compressed_ data stream is requested
when it exceeds a certain limit. Additionally restore would have
to use a comparable method of "chaining" the multiple volumes,
as it requires operator attention and action.



> >> Lastly, I want to make a backup of one entire _system_... not just one of
> >> the several partitions that compose that system.  How exactly can I do
> >> this? 
> >
> >At least not with dump. The dump utility operates on file systems,
> >this means "it takes partitions as input". Whatever is _one_ partition
> >can be processed "per step".
> 
> Well, this is entirely sub-optimal.

It depends on how you did layout your system. Using dump + restore
means to operate on partitions. Make the system one partition - deal
with one partition. Make many partitions - need to deal with them
individually.



> (I hate to say it, because in general I loath & despise Windows, but even
> Windows has a built-in facility for making a single backup of an _entire_
> system, and in a single step, *and*, I presume in a space-efficient manner.)

That would be a task for dd. :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Ronald F. Guilmette

In message <20121105021817.fc5bff1b.free...@edvax.de>, 
Polytropon  wrote:

>> I would like to make this backup to a _minimal_ number of DVD+R disks.
>
>If you think you can add compression to your files (if it makes
>sense), it should be incorporated to the command.

Yes.  There really ought to be a -z option integrated into both dump and
restore commands.

>The command "growisofs -Z /dev/cd0=" will record the file "like
>an image" to the media. In most cases, that would be an ISO-9660 file
>system, like "growisofs -Z /dev/cd0=stuff.iso" (with a premastered
>file stuff.iso). In _this_ case, the input data is read directly from
>file descriptor 0, stdin. Whatever appears there, it will be written
>to the media.

Ah!  OK.  I see now.  Thank you.


>> If so, how would I do this?  Would a command
>> such as the following work?
>> 
>>/sbin/dump -0u  -L -C16 -B4589840 -P 'dd of=/dev/acd0 bs=2048' /u
>> 
>> If not, why not? 
>
>As far as I know, direct device access for writing does not work here.

Yes, apparently not.  Bit I _did_ just find something rather interesting
in this context.  Look at this:

http://sg.danny.cz/sg/ddpt.html

I have no idea why it isn't already in the ports tree.

I'll probably try it out and see if it works.

>> Another issue is that I most definitely want to use an absolute minimum...
>
>Taking the initial approach of
>
>/sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u
>
>it could be something like this:
>
>/sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | growisofs -Z /dev/cd0=-' /u

Yes.  I see.  That makes sense.

But as I said (above) to make this really work right, dump & restore really
need to have -z options, and do the zipping/unzipping internally.  Only
if this were available could dump properly deal with end-of-media on any
given output volume, I think.

>> Lastly, I want to make a backup of one entire _system_... not just one of
>> the several partitions that compose that system.  How exactly can I do
>> this? 
>
>At least not with dump. The dump utility operates on file systems,
>this means "it takes partitions as input". Whatever is _one_ partition
>can be processed "per step".

Well, this is entirely sub-optimal.

(I hate to say it, because in general I loath & despise Windows, but even
Windows has a built-in facility for making a single backup of an _entire_
system, and in a single step, *and*, I presume in a space-efficient manner.)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Ronald F. Guilmette

In message 
Mehmet Erol Sanliturk  wrote:

>Assume one file will NOT be copied more than ONE DVD , i.e. , each file
>will be completely recorded on one DVD :
>
>http://en.wikipedia.org/wiki/Cutting_stock_problem

The problem you cited is an interesting one, but I do not believe that
it is at all relevant to the current discussion for the simple reason
that this "cutting problem" is based on the assmption that one "thing"
(e.g. a cut piece of paper) cannot be spread across two or more of the
available units of raw material (e.g. a standard roll of paper).

I'm sure that is true for paper, but as regards to FreeBSD partition
backups, these have always been allowed to cross output volume boundaries,
I think, e.g. spilling off the end of one backup tape and onto the beginning
of the next backup tape.


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Da Rock
On 11/05/12 11:18, Polytropon wrote:
> On Sun, 04 Nov 2012 16:56:58 -0800, Ronald F. Guilmette wrote:
>> I would like to make a backup of one of my systems using dump(8) in order
>> to be sure that I get everything, including all of the obscure file attribute
>> bits.
> That eliminates at least some tools. I have been using a similar
> idea in the past to make a backup of a system using multiple CD-Rs
> and I think cpio or pax, but only for data files that do not come
> with the whole range of "special attributes". Oh wait, it was afio,
> on FreeBSD 4...
>
>
>
>> I would like to make this backup to a _minimal_ number of DVD+R disks.
> If you think you can add compression to your files (if it makes
> sense), it should be incorporated to the command.
>
>
>
>> What's the proper procedure for this?
>>
>> In the dump(8) man page, I see the following example:
>>
>>   /sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u
>>
>> There are several problems with this example, as far as I am concerned.
>>
>> First I have no particular interest in, or need for _either_ an ISO 9660
>> _or_ a UDF file system on my backup media.  And in fact, that seems to me
>> as if it is likely to be an utter waste of (precious) space on the backup
>> media.  Can't I just put the output of the dump command _directly_ onto
>> the output DVD+R media? 
> I think this command exactly does this. Your idea is correct: There
> is no need for ISO-9660 or UDF on backup media as it will not be
> mounted, but processed with the proper restore tool.
>
> The command "growisofs -Z /dev/cd0=" will record the file "like
> an image" to the media. In most cases, that would be an ISO-9660 file
> system, like "growisofs -Z /dev/cd0=stuff.iso" (with a premastered
> file stuff.iso). In _this_ case, the input data is read directly from
> file descriptor 0, stdin. Whatever appears there, it will be written
> to the media. Here it is dump's output data stream.
>
>
>
>> If so, how would I do this?  Would a command
>> such as the following work?
>>
>>/sbin/dump -0u  -L -C16 -B4589840 -P 'dd of=/dev/acd0 bs=2048' /u
>>
>> If not, why not? 
> As far as I know, direct device access for writing does not work here.
> There are some operating systems that support an approach like this
> (IRIX for example, if I remember correctly), but FreeBSD doesn't.
>
> Depending on your OS version, acd0 != cd0 might appear, being different
> in access method, i. e. ATAPI vs. ATAPICAM ("SCSI over ATA").
>
>
>
>> Actually, I just noticed in the dump manpage the -f option.  So would this
>> work in place of the above command line?
>>
>>/sbin/dump -0u  -L -C16 -B4589840 -f /dev/acd0 /u
>>
>> And if THAT works, then can dump properly sense the actual end-of-media on
>> /dev/acd0, so that the -B option can just be ommitted?
> I've never tried if /dev/acd0 (or /dev/cd0 for the reason mentioned
> above) would be able to "start a writing session" by receiving data
> in that kind of way. The -f option is typically used to send data to
> files, or to - to hand them to another program or pipeline. It seems
> that doing so for devices (and causing the _physical_ devices to do
> something with it) is not possible.
>
>
>
>> Another issue is that I most definitely want to use an absolute minimum
>> of DVD+Rs to store the dump.  So I am wondering how I might be able to
>> wedge gzip into this whole process.  Could I do something like this?  If
>> not, why not?
>>
>>/sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | dd of=/dev/acd0 bs=2048' /u
> Taking the initial approach of
>
> /sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u
>
> it could be something like this:
>
> /sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | growisofs -Z /dev/cd0=-' /u
>
> Not tested, just an idea. Just check how -P interacts with /dev/fd/0
> and - for "stdin" _within_ the pipe command.
>
>
>
>> Lastly, I want to make a backup of one entire _system_... not just one of
>> the several partitions that compose that system.  How exactly can I do
>> this? 
> At least not with dump. The dump utility operates on file systems,
> this means "it takes partitions as input". Whatever is _one_ partition
> can be processed "per step". Maybe you could concatenate runs of
> dump of all the present partitions; however it will be a bit more
> complicated to restore them using the restore program, which reads
> file system dumps and outputs the data to initialized and mounted
> file systems.
>
>
>
>> I mean sure, I can back up each partition separately, using dump,
>> one at a time, but if I do that then the logical implication would seem
>> to be that on the last DVD+R used to make a backup of each of the partitions,
>> there could possibly be a lot of unused/wasted space which could have been
>> used to store the first part of the dump for the next partition in turn.
> Yes, that is quite possible. In this case, using dd would maybe be
> better. You would use it to copy the whole disk containing a

Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Mehmet Erol Sanliturk
On Sun, Nov 4, 2012 at 4:56 PM, Ronald F. Guilmette
wrote:

>
> I would like to make a backup of one of my systems using dump(8) in order
> to be sure that I get everything, including all of the obscure file
> attribute
> bits.
>
> I would like to make this backup to a _minimal_ number of DVD+R disks.
>
> What's the proper procedure for this?
>
> In the dump(8) man page, I see the following example:
>
>   /sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u
>
> There are several problems with this example, as far as I am concerned.
>
> First I have no particular interest in, or need for _either_ an ISO 9660
> _or_ a UDF file system on my backup media.  And in fact, that seems to me
> as if it is likely to be an utter waste of (precious) space on the backup
> media.  Can't I just put the output of the dump command _directly_ onto
> the output DVD+R media?  If so, how would I do this?  Would a command
> such as the following work?
>
>/sbin/dump -0u  -L -C16 -B4589840 -P 'dd of=/dev/acd0 bs=2048' /u
>
> If not, why not?  (I  already know for sure that I can _read_ everything
> off of a DVD+R using just dd, so it seems logical that I should likewise
> be able to write an entire CD using just dd, but I suspect that there may
> be more to it that this, since I've never seen any references or examples
> anywhere of anybody writing either CDs or DVDs using dd.)
>
> Actually, I just noticed in the dump manpage the -f option.  So would this
> work in place of the above command line?
>
>/sbin/dump -0u  -L -C16 -B4589840 -f /dev/acd0 /u
>
> And if THAT works, then can dump properly sense the actual end-of-media on
> /dev/acd0, so that the -B option can just be ommitted?
>
> Another issue is that I most definitely want to use an absolute minimum
> of DVD+Rs to store the dump.  So I am wondering how I might be able to
> wedge gzip into this whole process.  Could I do something like this?  If
> not, why not?
>
>/sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | dd of=/dev/acd0 bs=2048' /u
>
> Lastly, I want to make a backup of one entire _system_... not just one of
> the several partitions that compose that system.  How exactly can I do
> this?  I mean sure, I can back up each partition separately, using dump,
> one at a time, but if I do that then the logical implication would seem
> to be that on the last DVD+R used to make a backup of each of the
> partitions,
> there could possibly be a lot of unused/wasted space which could have been
> used to store the first part of the dump for the next partition in turn.
> Is there any way to effectively deal with _this_ issue?
>
>
> Regards,
> rfg
>




Assume one file will NOT be copied more than ONE DVD , i.e. , each file
will be completely recorded on one DVD :

http://en.wikipedia.org/wiki/Cutting_stock_problem


Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Questions about dump/restore to/from DVD media

2012-11-04 Thread Polytropon
On Sun, 04 Nov 2012 16:56:58 -0800, Ronald F. Guilmette wrote:
> 
> I would like to make a backup of one of my systems using dump(8) in order
> to be sure that I get everything, including all of the obscure file attribute
> bits.

That eliminates at least some tools. I have been using a similar
idea in the past to make a backup of a system using multiple CD-Rs
and I think cpio or pax, but only for data files that do not come
with the whole range of "special attributes". Oh wait, it was afio,
on FreeBSD 4...



> I would like to make this backup to a _minimal_ number of DVD+R disks.

If you think you can add compression to your files (if it makes
sense), it should be incorporated to the command.



> What's the proper procedure for this?
> 
> In the dump(8) man page, I see the following example:
> 
>   /sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u
> 
> There are several problems with this example, as far as I am concerned.
> 
> First I have no particular interest in, or need for _either_ an ISO 9660
> _or_ a UDF file system on my backup media.  And in fact, that seems to me
> as if it is likely to be an utter waste of (precious) space on the backup
> media.  Can't I just put the output of the dump command _directly_ onto
> the output DVD+R media? 

I think this command exactly does this. Your idea is correct: There
is no need for ISO-9660 or UDF on backup media as it will not be
mounted, but processed with the proper restore tool.

The command "growisofs -Z /dev/cd0=" will record the file "like
an image" to the media. In most cases, that would be an ISO-9660 file
system, like "growisofs -Z /dev/cd0=stuff.iso" (with a premastered
file stuff.iso). In _this_ case, the input data is read directly from
file descriptor 0, stdin. Whatever appears there, it will be written
to the media. Here it is dump's output data stream.



> If so, how would I do this?  Would a command
> such as the following work?
> 
>/sbin/dump -0u  -L -C16 -B4589840 -P 'dd of=/dev/acd0 bs=2048' /u
> 
> If not, why not? 

As far as I know, direct device access for writing does not work here.
There are some operating systems that support an approach like this
(IRIX for example, if I remember correctly), but FreeBSD doesn't.

Depending on your OS version, acd0 != cd0 might appear, being different
in access method, i. e. ATAPI vs. ATAPICAM ("SCSI over ATA").



> Actually, I just noticed in the dump manpage the -f option.  So would this
> work in place of the above command line?
> 
>/sbin/dump -0u  -L -C16 -B4589840 -f /dev/acd0 /u
> 
> And if THAT works, then can dump properly sense the actual end-of-media on
> /dev/acd0, so that the -B option can just be ommitted?

I've never tried if /dev/acd0 (or /dev/cd0 for the reason mentioned
above) would be able to "start a writing session" by receiving data
in that kind of way. The -f option is typically used to send data to
files, or to - to hand them to another program or pipeline. It seems
that doing so for devices (and causing the _physical_ devices to do
something with it) is not possible.



> Another issue is that I most definitely want to use an absolute minimum
> of DVD+Rs to store the dump.  So I am wondering how I might be able to
> wedge gzip into this whole process.  Could I do something like this?  If
> not, why not?
> 
>/sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | dd of=/dev/acd0 bs=2048' /u

Taking the initial approach of

/sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u

it could be something like this:

/sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | growisofs -Z /dev/cd0=-' /u

Not tested, just an idea. Just check how -P interacts with /dev/fd/0
and - for "stdin" _within_ the pipe command.



> Lastly, I want to make a backup of one entire _system_... not just one of
> the several partitions that compose that system.  How exactly can I do
> this? 

At least not with dump. The dump utility operates on file systems,
this means "it takes partitions as input". Whatever is _one_ partition
can be processed "per step". Maybe you could concatenate runs of
dump of all the present partitions; however it will be a bit more
complicated to restore them using the restore program, which reads
file system dumps and outputs the data to initialized and mounted
file systems.



> I mean sure, I can back up each partition separately, using dump,
> one at a time, but if I do that then the logical implication would seem
> to be that on the last DVD+R used to make a backup of each of the partitions,
> there could possibly be a lot of unused/wasted space which could have been
> used to store the first part of the dump for the next partition in turn.

Yes, that is quite possible. In this case, using dd would maybe be
better. You would use it to copy the whole disk containing all the
partitions, add gzip, break it into "multi-volume parts" and then
record it to DVD+R.



> Is there any way to effectively deal with _this_ issue?

Not per se, but I t

Questions about dump/restore to/from DVD media

2012-11-04 Thread Ronald F. Guilmette

I would like to make a backup of one of my systems using dump(8) in order
to be sure that I get everything, including all of the obscure file attribute
bits.

I would like to make this backup to a _minimal_ number of DVD+R disks.

What's the proper procedure for this?

In the dump(8) man page, I see the following example:

  /sbin/dump -0u  -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /u

There are several problems with this example, as far as I am concerned.

First I have no particular interest in, or need for _either_ an ISO 9660
_or_ a UDF file system on my backup media.  And in fact, that seems to me
as if it is likely to be an utter waste of (precious) space on the backup
media.  Can't I just put the output of the dump command _directly_ onto
the output DVD+R media?  If so, how would I do this?  Would a command
such as the following work?

   /sbin/dump -0u  -L -C16 -B4589840 -P 'dd of=/dev/acd0 bs=2048' /u

If not, why not?  (I  already know for sure that I can _read_ everything
off of a DVD+R using just dd, so it seems logical that I should likewise
be able to write an entire CD using just dd, but I suspect that there may
be more to it that this, since I've never seen any references or examples
anywhere of anybody writing either CDs or DVDs using dd.)

Actually, I just noticed in the dump manpage the -f option.  So would this
work in place of the above command line?

   /sbin/dump -0u  -L -C16 -B4589840 -f /dev/acd0 /u

And if THAT works, then can dump properly sense the actual end-of-media on
/dev/acd0, so that the -B option can just be ommitted?

Another issue is that I most definitely want to use an absolute minimum
of DVD+Rs to store the dump.  So I am wondering how I might be able to
wedge gzip into this whole process.  Could I do something like this?  If
not, why not?

   /sbin/dump -0u  -L -C16 -B4589840 -P 'gzip | dd of=/dev/acd0 bs=2048' /u

Lastly, I want to make a backup of one entire _system_... not just one of
the several partitions that compose that system.  How exactly can I do
this?  I mean sure, I can back up each partition separately, using dump,
one at a time, but if I do that then the logical implication would seem
to be that on the last DVD+R used to make a backup of each of the partitions,
there could possibly be a lot of unused/wasted space which could have been
used to store the first part of the dump for the next partition in turn.
Is there any way to effectively deal with _this_ issue?


Regards,
rfg
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-07-01 Thread perryh
"Peter A. Giessel"  wrote:

> What I have been completely unable to find is a linux boot disk
> that has a version of restore that supports ext4.

It's unclear to me how "a version of restore that supports ext4"
would differ from "a version of restore that supports UFS".

AFAIK restore (unlike dump) is FS-agnostic:  it must understand the
format of the dumpfile, but it needs no knowledge of how the FS is
represented on disk because it uses ordinary system calls (open,
write, etc.) to access the FS.

What you _do_ need on that recovery disk -- along with a generic
restore -- are ext4-aware versions of the kernel, fsck, mkfs, mount,
and (arguably) dump.

> I am very hesitant to use a backup scheme that doesn't have a
> clear recovery path.

+1
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-29 Thread Mark Felder
On Fri, 29 Jun 2012 00:52:35 -0500, Peter A. Giessel   
wrote:




There are a lot of Linux boot disks out there. I haven't found one yet  
that includes an ext4 compatible restore. Debian lets you roll your own,  
but you need to do that before a disaster. It doesn't include useful  
rescue CDs like FreeBSD does.


I've always had great success in the past with RIP Rescue live-cd. It was  
one of the early live-cds with ext4 support. I wonder if the guy who makes  
it was smart enough to add restore

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-29 Thread Thomas Mueller
"Peter A. Giessel"  responded:

> According to:
> http://www.sysresccd.org/Detailed-packages-list

> It does not contain any version of restore.

> There are a lot of Linux boot disks out there. I haven't found one yet that 
> includes an ext4 compatible restore. Debian lets you roll your own, but you 
> need to do that before a disaster. It doesn't include useful rescue CDs like 
> FreeBSD does.

You could try
http://www.sysresccd.org/System-tools

Some recovery tools are listed, including FSArchiver and Partimage.

Maybe one of those listed recovery tools might fit your need?

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Peter A. Giessel

> I haven't checked all the features, so I don't know if it includes restore 
> for ext4.

According to:
http://www.sysresccd.org/Detailed-packages-list

It does not contain any version of restore. 

There are a lot of Linux boot disks out there. I haven't found one yet that 
includes an ext4 compatible restore. Debian lets you roll your own, but you 
need to do that before a disaster. It doesn't include useful rescue CDs like 
FreeBSD does. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Thomas Mueller
On Jun 28, 2012, at 11:59, Vincent Hoffman  wrote:

> We use dump to backup ext4 filesystems on linux (Centos6) at work

"Peter A. Giessel"  responded:

> You can find a version of dump for Linux that supports ext4.  What I have 
> been completely unable to find is a linux boot disk that has a version of 
> restore
that supports ext4.  If anyone knows of one, I would be very interested.  I am 
very hesitant to use a backup scheme that doesn't have a clear recovery path.

I've used the System Rescue CD (sysresccd.org), which you can burn to CD or 
write to USB stick.

I haven't checked all the features, so I don't know if it includes restore for 
ext4.

Latest release version is 2.8.0 

It ought to read/write ext4. I think it would read (BSD) ffs or ufs v1 but not 
v2.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Vincent Hoffman
On 28/06/2012 21:39, Peter A. Giessel wrote:
>
> On Jun 28, 2012, at 11:59, Vincent Hoffman  wrote:
>
>> We use dump to backup ext4 filesystems on linux (Centos6) at work
> You can find a version of dump for Linux that supports ext4.  What I have 
> been completely unable to find is a linux boot disk that has a version of 
> restore that supports ext4.  If anyone knows of one, I would be very 
> interested.  I am very hesitant to use a backup scheme that doesn't have a 
> clear recovery path.

Fair point. I've used the "rescue" mode on the centos boot CD before,
but its not too hard to build a custom centos livecd.
I made a pxe bootable version for use at work so we can ssh into it
without needing an IP KVM, but I'll try and make a new ISO for you if
you like.

Vince

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Peter A. Giessel


On Jun 28, 2012, at 11:59, Vincent Hoffman  wrote:

> We use dump to backup ext4 filesystems on linux (Centos6) at work

You can find a version of dump for Linux that supports ext4.  What I have been 
completely unable to find is a linux boot disk that has a version of restore 
that supports ext4.  If anyone knows of one, I would be very interested.  I am 
very hesitant to use a backup scheme that doesn't have a clear recovery path.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Polytropon
On Thu, 28 Jun 2012 20:59:57 +0100, Vincent Hoffman wrote:
> We use dump to backup ext4 filesystems on linux (Centos6) at work
> 
> From the linux dump changelog
> Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009)
> ===
> 18. Add (preliminary) ext4 support - thanks to libext2fs which does
> all the job for us. Thanks to Gertjan van Wingerde
>  for the patch.

Without even trying to start a flamewar, allow me to ask this
question: Do they _really_ use file systems "over there at
Linux land" without having an up-to-date dump/restore mechanism
for that file systems? I can hardly believe that...



> Without wishing to bash Linux (I wouldnt be in my job without it,) its
> man pages are really not very up to date, as the manpage for dump fails
> to mention this.

That's sadly normal. I found the attitude toward documentation in
Linux being different from what you would call standard in the rest
of UNIX world. Man pages are often out of date (if they ever exist),
and pieces of documentation is scattered across the the web, in user
pages, wikis, and discussion forums. The concept behind this seems
to be: "Nobody reads man pages, so we don't write them."



> I havent used slackware in many years but it used to be my distro of
> choice until I moved to FreeBSD.

Was my first PC Linux, too. :-)



> On 28/06/2012 20:02, Chris Maness wrote:
> > Is there an equivalent dump/restore ap for a Linux ext4 file system?
> > I am running the latest Slackware, and I would like to make backups
> > like I do for my FreeBSD box.

Have you tried the original tools provided by the OS? Do they perform
as intended? Maybe do some testing and see if they are sufficient for
dealing with ext4. That would be my first impression: Use what's there
and see if it works, as it _should_ work (given fundamental UNIX basics).

(Sorry, my Linux knowledge is a bit outdated as I don't use it anymore
on a regular basis.)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Vincent Hoffman
We use dump to backup ext4 filesystems on linux (Centos6) at work

>From the linux dump changelog
Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009)
===
18. Add (preliminary) ext4 support - thanks to libext2fs which does
all the job for us. Thanks to Gertjan van Wingerde
 for the patch.


Without wishing to bash Linux (I wouldnt be in my job without it,) its
man pages are really not very up to date, as the manpage for dump fails
to mention this.
Centos 6 dump version is
dump 0.4b42 (using libext2fs 1.41.12 of 17-May-2010)

I havent used slackware in many years but it used to be my distro of
choice until I moved to FreeBSD.

Hope this helps,
Vince


On 28/06/2012 20:02, Chris Maness wrote:
> Is there an equivalent dump/restore ap for a Linux ext4 file system?
> I am running the latest Slackware, and I would like to make backups
> like I do for my FreeBSD box.
>
> Thanks,
> Chris Maness
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


OT: Linux EXT4 dump/restore equivalent?

2012-06-28 Thread Chris Maness
Is there an equivalent dump/restore ap for a Linux ext4 file system?
I am running the latest Slackware, and I would like to make backups
like I do for my FreeBSD box.

Thanks,
Chris Maness
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread Warren Block

On Tue, 7 Feb 2012, dick wrote:


Op 7-2-2012 12:23, Vincent Hoffman schreef:

On 07/02/2012 11:00, dick wrote:

I run a ZFS on root FreeBSD system. I know I can backup with snapshots
but I want a dump/restore action because I want to transfer this
system to a UFS virtual FreeBSD machine.
My question is: will dump / (root) make a dump of *ALL* other
directories?


Dump works at the filesystem level and will not work on a zfs filesystem
[root@banshee /backup/local/zfs]# dump -b 64  -f - ./
dump: ./: unknown file system

I'd use tar or cpio or pax or something.
On a UFS filesystem dump will only dump the filesystem specified and
will not cross mountpoints.

OK, got it. I will have to read up on the best option (tar, cpio or pax)


Or rsync, with -a, -H, and probably some other options I can't recall.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread Fritz Wuehler
> > I'd use tar or cpio or pax or something.

zfs has tools built in for this

man zfs

and look for "send" with the recursive option

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread Dick Hoogendijk

Op 7-2-2012 15:18, William Brown schreef:

On 07/02/2012, at 22:25, dick wrote:


Op 7-2-2012 12:23, Vincent Hoffman schreef:

On 07/02/2012 11:00, dick wrote:

I run a ZFS on root FreeBSD system. I know I can backup with snapshots
but I want a dump/restore action because I want to transfer this
system to a UFS virtual FreeBSD machine.
My question is: will dump / (root) make a dump of *ALL* other
directories?


Dump works at the filesystem level and will not work on a zfs filesystem
[root@banshee /backup/local/zfs]# dump -b 64  -f - ./
dump: ./: unknown file system

I'd use tar or cpio or pax or something.
On a UFS filesystem dump will only dump the filesystem specified and
will not cross mountpoints.

OK, got it. I will have to read up on the best option (tar, cpio or pax)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Why not use the ZFS send / receive command?
After reading the info on 
http://www.aisecure.net/2011/03/26/cloning-a-zfs-bootable-system/ I 
might be doing that. Sounds not too difficult and it is not really a 
problem to have ZFS on the virtual machine. It runs good enough, at 
least solaris 11 runs smoothly as a VM. Thanks for the tips.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread Michael Sierchio
On Tue, Feb 7, 2012 at 6:18 AM, William Brown
 wrote:

> Why not use the ZFS send / receive command?

and how well does that work on UFS filesystems?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread William Brown

On 07/02/2012, at 22:25, dick wrote:

> Op 7-2-2012 12:23, Vincent Hoffman schreef:
>> On 07/02/2012 11:00, dick wrote:
>>> I run a ZFS on root FreeBSD system. I know I can backup with snapshots
>>> but I want a dump/restore action because I want to transfer this
>>> system to a UFS virtual FreeBSD machine.
>>> My question is: will dump / (root) make a dump of *ALL* other
>>> directories?
>>> 
>> Dump works at the filesystem level and will not work on a zfs filesystem
>> [root@banshee /backup/local/zfs]# dump -b 64  -f - ./
>> dump: ./: unknown file system
>> 
>> I'd use tar or cpio or pax or something.
>> On a UFS filesystem dump will only dump the filesystem specified and
>> will not cross mountpoints.
> OK, got it. I will have to read up on the best option (tar, cpio or pax)
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Why not use the ZFS send / receive command?



Sincerely,

William Brown

Research & Teaching, Technology Services
The University of Adelaide, AUSTRALIA 5005

CRICOS Provider Number 00123M
-
IMPORTANT: This message may contain confidential or legally privileged
information. If you think it was sent to you by mistake, please delete all
copies and advise the sender. For the purposes of the SPAM Act 2003, this
email is authorised by The University of Adelaide.

pgp.mit.edu
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x3C0AC6DAB2F928A2






signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Dump Restore on ZFS root system

2012-02-07 Thread George Kontostanos
On Tue, Feb 7, 2012 at 1:55 PM, dick  wrote:
> Op 7-2-2012 12:23, Vincent Hoffman schreef:
>
>> On 07/02/2012 11:00, dick wrote:
>>>
>>> I run a ZFS on root FreeBSD system. I know I can backup with snapshots
>>> but I want a dump/restore action because I want to transfer this
>>> system to a UFS virtual FreeBSD machine.
>>> My question is: will dump / (root) make a dump of *ALL* other
>>> directories?
>>>
>> Dump works at the filesystem level and will not work on a zfs filesystem
>> [root@banshee /backup/local/zfs]# dump -b 64  -f - ./
>> dump: ./: unknown file system
>>
>> I'd use tar or cpio or pax or something.
>> On a UFS filesystem dump will only dump the filesystem specified and
>> will not cross mountpoints.
>
> OK, got it. I will have to read up on the best option (tar, cpio or pax)

You can always clone it using zfs send / receive to your vm:

http://www.aisecure.net/2011/03/26/cloning-a-zfs-bootable-system/


-- 
George Kontostanos
Aicom telecoms ltd
http://www.aisecure.net
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread dick

Op 7-2-2012 12:23, Vincent Hoffman schreef:

On 07/02/2012 11:00, dick wrote:

I run a ZFS on root FreeBSD system. I know I can backup with snapshots
but I want a dump/restore action because I want to transfer this
system to a UFS virtual FreeBSD machine.
My question is: will dump / (root) make a dump of *ALL* other
directories?


Dump works at the filesystem level and will not work on a zfs filesystem
[root@banshee /backup/local/zfs]# dump -b 64  -f - ./
dump: ./: unknown file system

I'd use tar or cpio or pax or something.
On a UFS filesystem dump will only dump the filesystem specified and
will not cross mountpoints.

OK, got it. I will have to read up on the best option (tar, cpio or pax)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump Restore on ZFS root system

2012-02-07 Thread Vincent Hoffman
On 07/02/2012 11:00, dick wrote:
> I run a ZFS on root FreeBSD system. I know I can backup with snapshots
> but I want a dump/restore action because I want to transfer this
> system to a UFS virtual FreeBSD machine.
> My question is: will dump / (root) make a dump of *ALL* other
> directories?
>
Dump works at the filesystem level and will not work on a zfs filesystem
[root@banshee /backup/local/zfs]# dump -b 64  -f - ./
dump: ./: unknown file system

I'd use tar or cpio or pax or something.
On a UFS filesystem dump will only dump the filesystem specified and
will not cross mountpoints.

Vince
> yanta# df -h
> Filesystem   SizeUsed   Avail Capacity 
> Mounted on
> zroot56G335M 55G 1%/
> devfs1.0K1.0K  0B  
> 100%/dev
> zroot/tmp56G 42M 55G 0%/tmp
> zroot/usr  60G4.7G 55G 8%/usr
> zroot/usr/home  58G2.4G 55G 4%/usr/home
> zroot/usr/ports   56G253M 55G 0%   
> /usr/ports
> zroot/usr/ports/distfiles56G291M 55G 1%   
> /usr/ports/distfiles
> zroot/usr/ports/packages  55G 21K 55G 0%   
> /usr/ports/packages
> zroot/var  56G571M 55G 1%/var
> zroot/var/crash   55G 23K 55G 0%   
> /var/crash
> zroot/var/db56G337M 55G 1%/var/db
> zroot/var/db/pkg55G3.7M 55G 0%/var/db/pkg
> zroot/var/empty 55G 21K 55G 0%/var/empty
> zroot/var/log   55G827K 55G 0%   
> /var/log
> zroot/var/mail 55G 22K 55G 0%   
> /var/mail
> zroot/var/run   55G 53K 55G 0%   
> /var/run
> zroot/var/tmp  55G143K 55G 0%/var/tmp
> devfs  1.0K1.0K  0B  
> 100%/var/named/dev
>
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Dump Restore on ZFS root system

2012-02-07 Thread dick
I run a ZFS on root FreeBSD system. I know I can backup with snapshots 
but I want a dump/restore action because I want to transfer this system 
to a UFS virtual FreeBSD machine.

My question is: will dump / (root) make a dump of *ALL* other directories?

yanta# df -h
Filesystem   SizeUsed   Avail Capacity  
Mounted on

zroot56G335M 55G 1%/
devfs1.0K1.0K  0B   100%/dev
zroot/tmp56G 42M 55G 0%/tmp
zroot/usr  60G4.7G 55G 8%/usr
zroot/usr/home  58G2.4G 55G 4%/usr/home
zroot/usr/ports   56G253M 55G 0%/usr/ports
zroot/usr/ports/distfiles56G291M 55G 1%
/usr/ports/distfiles

zroot/usr/ports/packages  55G 21K 55G 0%/usr/ports/packages
zroot/var  56G571M 55G 1%/var
zroot/var/crash   55G 23K 55G 0%/var/crash
zroot/var/db56G337M 55G 1%/var/db
zroot/var/db/pkg55G3.7M 55G 0%/var/db/pkg
zroot/var/empty 55G 21K 55G 0%/var/empty
zroot/var/log   55G827K 55G 0%/var/log
zroot/var/mail 55G 22K 55G 0%/var/mail
zroot/var/run   55G 53K 55G 0%/var/run
zroot/var/tmp  55G143K 55G 0%/var/tmp
devfs  1.0K1.0K  0B   
100%/var/named/dev


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re[2]: dump/restore, how to reduce slice size

2011-09-30 Thread Коньков Евгений
Здравствуйте, Robert.

Вы писали 30 сентября 2011 г., 4:11:15:

>> From owner-freebsd-questi...@freebsd.org  Thu Sep 29 14:37:35 2011
>> Date: Thu, 29 Sep 2011 22:36:38 +0300
>> From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= 
>> To: freebsd-questions@freebsd.org
>> Subject: dump/restore, how to reduce slice size
>>
>> Hi, Freebsd-questions.
>>
>> # df -h
>> Filesystem SizeUsed   Avail Capacity  Mounted on
>> /dev/ad4s1a  2G206M1.6G11%/
>> devfs  1.0k1.0k  0B   100%/dev
>> /dev/ad4s1e3.9G 13M3.6G 0%/tmp
>> /dev/ad4s1f 40G 25G 12G67%/usr
>> /dev/ad4s1d 31G3.6G 24G13%/var
>> procfs 4.0k4.0k  0B   100%/proc
>> /dev/ad2s1f 39G 25G 10G71%/mnt
>> devfs  1.0k1.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?

RB> ad2s1f already has 25 gigs of stuff on it.  with ounly 14 gigs 'free'.
RB> ad4s1f has 25 gigs of stuff on _it_.

RB> The 25 gigs of ad4s1f will not fit in the  14 gigs of free space on
RB> ad2s1f.
It is state after restoration. Before that I do the prestine file
system with:
newfs /dev/ad2s1f
mount /dev/ad2s1f /mnt
cd /mnt
dump -0Lf - /usr | restore -rf -

at the end of restore process I got error about that on target file
system there is no inode . abourt? [yn]
I type 'n'. there are about 10 inodes missed.
when I compare files it seems that are same on source and target.
Is that Ok, may I do not worry about that error messages?

RB> Now, 
RB> *IF* the existing 'stuff' on ad2s1f is of no value,  and the -only- thing
RB> you want to have on that filesystem is the 'copy' of ad4s1f, 
RB> *THEN*  there is 'simple'  solution.  You need to delete the files on
RB> ad4s1f -before- trying the dump/restor.  In the commnds you show, above,
RB> fter the 'cd /mnt', and before the dump/restore, Type in 'rm -fr  /mnt/*',
RB> but DO NOT hit the enter key.  Look at what you typed, and make sure 
RB> that there is no white-spce immediately before the '*'.  Double check
RB> that there is no whitespce after the first '/'. or before the 2nd one.
RB> TRIPLE CHECK that there are no spaces before the '*'.   Have you made
RB> a full back-up of the system recently?  If not, abort this commqnd, and
RB> make the full backup before trying  this again.

RB> *IF* you are absolutely certain you have typed the commnd correctly, _and_
RB> you have  current full-system backup, then go ahead nd press the enter
RB> key.
thank you for attention. I understand that.

RB> As my friend Dante Brown once remarked: 

RB>  "All hope abandon
RB>   ye who press Enter
RB>   here."






-- 
С уважением,
 Коньков  mailto:kes-...@yandex.ru

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dump/restore, how to reduce slice size

2011-09-30 Thread Jerry McAllister
On Fri, Sep 30, 2011 at 03:41:26PM +0200, Damien Fleuriot wrote:

> 
> 
> 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 SizeUsed   Avail Capacity  Mounted on
> >> /dev/ad4s1a  2G206M1.6G11%/
> >> devfs  1.0k1.0k  0B   100%/dev
> >> /dev/ad4s1e3.9G 13M3.6G 0%/tmp
> >> /dev/ad4s1f 40G 25G 12G67%/usr
> >> /dev/ad4s1d 31G3.6G 24G13%/var
> >> procfs 4.0k4.0k  0B   100%/proc
> >> /dev/ad2s1f 39G 25G 10G71%/mnt
> >> devfs  1.0k1.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.

 Yes.  He already has 25 GB used on the partition and wants
to add another approx 25 GB in a 39 GB partition.  There ain't room.

jerry

> 
> @OP, refer the following link for correct dump/restore syntax:
> http://www.wonkity.com/~wblock/docs/html/backup.html#_tt_dump_tt_with_compression
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dump/restore, how to reduce slice size

2011-09-30 Thread John Levine
>>> # df -h
>>> Filesystem SizeUsed   Avail Capacity  Mounted on
>>> /dev/ad4s1a  2G206M1.6G11%/
>>> devfs  1.0k1.0k  0B   100%/dev
>>> /dev/ad4s1e3.9G 13M3.6G 0%/tmp
>>> /dev/ad4s1f 40G 25G 12G67%/usr
>>> /dev/ad4s1d 31G3.6G 24G13%/var
>>> procfs 4.0k4.0k  0B   100%/proc
>>> /dev/ad2s1f 39G 25G 10G71%/mnt
>>> devfs  1.0k1.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?

You can't.  ad4s1f has 25G of files, but ad2s1f only has 10G of
free space.  You need a bigger disk.

If you're just moving things around, I agree that a $100 USB
disk is the best way to store backups temporarily.

R's,
John
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dump/restore, how to reduce slice size

2011-09-30 Thread Damien Fleuriot


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 SizeUsed   Avail Capacity  Mounted on
>> /dev/ad4s1a  2G206M1.6G11%/
>> devfs  1.0k1.0k  0B   100%/dev
>> /dev/ad4s1e3.9G 13M3.6G 0%/tmp
>> /dev/ad4s1f 40G 25G 12G67%/usr
>> /dev/ad4s1d 31G3.6G 24G13%/var
>> procfs 4.0k4.0k  0B   100%/proc
>> /dev/ad2s1f 39G 25G 10G71%/mnt
>> devfs  1.0k1.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

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dump/restore, how to reduce slice size

2011-09-29 Thread Jerry McAllister
On Thu, Sep 29, 2011 at 10:36:38PM +0300, ??? ??? wrote:

> Hi, Freebsd-questions.
> 
> # df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/ad4s1a  2G206M1.6G11%/
> devfs  1.0k1.0k  0B   100%/dev
> /dev/ad4s1e3.9G 13M3.6G 0%/tmp
> /dev/ad4s1f 40G 25G 12G67%/usr
> /dev/ad4s1d 31G3.6G 24G13%/var
> procfs 4.0k4.0k  0B   100%/proc
> /dev/ad2s1f 39G 25G 10G71%/mnt
> devfs  1.0k1.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.

jerry


jerry


> 
> -- 
> Konkov  mailto:kes-...@yandex.ru
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


dump/restore, how to reduce slice size

2011-09-29 Thread Коньков Евгений
Hi, Freebsd-questions.

# df -h
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/ad4s1a  2G206M1.6G11%/
devfs  1.0k1.0k  0B   100%/dev
/dev/ad4s1e3.9G 13M3.6G 0%/tmp
/dev/ad4s1f 40G 25G 12G67%/usr
/dev/ad4s1d 31G3.6G 24G13%/var
procfs 4.0k4.0k  0B   100%/proc
/dev/ad2s1f 39G 25G 10G71%/mnt
devfs  1.0k1.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?

-- 
Konkov  mailto:kes-...@yandex.ru

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Jail from dump/restore?

2010-08-12 Thread Christer Solskogen
On Wed, Aug 11, 2010 at 10:57 PM, Chris Maness  wrote:
> Is it possible to create a jail from a dump/restore of a real system.
> If so, would I just restore the dump to the jail tld?
>

That should be possible yes. But it's probably a better idea to just
create a new jail and transfer the data, then you'll get rid of old
cruft.

-- 
chs,
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Jail from dump/restore?

2010-08-11 Thread Chris Maness
Is it possible to create a jail from a dump/restore of a real system.
If so, would I just restore the dump to the jail tld?

Regards,
Chris Maness
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


dump/restore (to DVD+R) test failure

2010-05-24 Thread James Phillips
Hello,

It took reading the source code of a backup front-end to figure out that 
"incremental backups" are not the same thing as "multiple incremental backups 
on the same medium; spilling over to the next disk if necessary."

As the handbook (section 18.12.1) says, dump has quirks due to its design 
dating back to 1975. Optical write-once media was punch tape or cards. Seeking 
to the middle of the media was time consuming, so daily tapes were simply 
written from the beginning, then rewound.

So, knowing this, I decided to test a full dump and restore to DVD+R media, 
following the example in the dump(8) man page. I suspect that the example was 
written with DVD-R in mind, but according to wikipedia,
http://en.wikipedia.org/wiki/DVD-R#Recordable_DVD_capacity_comparison
the smaller DVD+R media can handle the example in dump(8) with 184 2048 byte 
blocks to spare (implying the example intended 3576 spare sectors). The package 
for the DVD media just says "4.7 GB" with only 2 significant digits.

I used the following command for the dump:
$/sbin/dump -0u -L -C16 -B4589840 -P 'growisofs -Z -dvd-compat 
/dev/cd0=/dev/fd/0' /home

Growisofs said 4700372992 bytes were written on the first disk (my notes don't 
record exactly which disk that was). That works out to 4590208kiB or 2295104 
sectors.
Edit: This matches the Wikipedia number; I assumed it to included zero padding

I tried the restore on a fresh freeBSD 8.0 install with no user accounts 
created (and atapicam not yet enabled):
dusty# cd /home
#restore -r -P 'dd if=/dev/acd0 of=/dev/fd/1 bs=2048 count=2294920'
warning: ./.snap: File exists
expected next file 706561, got 4
unknown tape header type -365754194
abort? [yn] n
resync restore, skipped 162 blocks
expected next file 847904, got 0
acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x10 ascq=0x00
dd: /dev/acd0: Input/output error
2294208+0 records in
2294208+0 records out
4698537984 bytes transferred in 2781.175375 secs (1689407 bytes/sec)
Mount tape volume 2
Enter ``none'' if there are no more tapes
otherwise enter tape name (default: dd if=/dev/acd0 of=/dev/fd/1 bs=2048 
count=2294920)
unknown tape header type -54549208
abort? [yn] n
resync restore, skipped 464 blocks
expected next file 5040133, got 0
1201264+0 records in
1201264+0 records out
2460188672 bytes transferred in 1330.121340 secs (1849597 bytes/sec)
dusty#

The "unknown header type" errors appear to be unrelated to the major read error 
reported at the end to the first disk. I suspect those may be corruption caused 
by a buffer underrun or local vibration.

Questions:
1. How do I determine which files (if any) are affected? is verbose mode 
required for that?
2. It appears the first disk lost 712 sectors of data (and a total of 896 
sectors of capacity) with that read error. Should I just burn the disks 
1024-4096 sectors short?
3. What is the best way to verify dumps at dump time?

I still have the data on another disk. I can restore it with dd if need be. I 
verified the newfs command appears to create a ".snap" directory by default now.

Regards,

James Phillips





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/restore to clone disk

2010-02-22 Thread Jerry McAllister
On Mon, Feb 22, 2010 at 04:33:47PM +0800, Aiza wrote:

> I have seen this posted in the questions archives to be
> used to clone a active system hard drive to a
> USB cabled hard drive.
> 
> 
> 
> Prepare the target
> #dd if=/dev/zero of=/dev/da0 count=2
> # fdisk -BI /dev/da0
> # bsdlabel -B -w da0s1
> # newfs ?U /dev/da0s1a   # /
> # newfs -U /dev/da0s1d   # /var
> # newfs -U /dev/da0s1e   # /tmp
> # newfs -U /dev/da0s1f   # /usr
> 
> Mount target file system ?a?
> # mount /dev/da0s1a /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1a  | restore -rf -
> # cd /
> # umount /mnt
> 
> Mount target file system ?d?
> # mount /dev/da0s1d /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1d  | restore -rf -
> # cd /
> # umount /mnt
> 
> Mount target file system ?e?
> # mount /dev/da0s1e /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1e  | restore -rf -
> # cd /
> # umount /mnt
> 
> Mount target file system ?f?
> # mount /dev/da0s1f /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1f  | restore -rf -
> # cd /
> # umount /mnt
> 
> 
> I have questions about this method.

Some of these questions sound like you have not been studying the
documentation as you should.   People on this list will quickly
lose patience if you do not do your own homework before asking
questions.  There is nothing so futile as trying to trying to 
explain something to someone who has not done their homework.

> 
> What happened to swap? The fstab will be showing it as
> the first file system on the hard drive slice.
> Is something missing here?

Swap is never backed up.   It makes no sense to back up swap.
It is just scratch space used by the OS and completely irrelevant
to any other system.
Try looking in to the documentation.

> 
> What about the file system sizes.
> Will the restored hard drive have the same
> file system sizes as the source file system?

Read the documentation.
They will have the same size as what you make them.  Dump/restore
do no create filesystems.  They just back up and restore data withing
filesystems.   You create the partitions yourself.  A filesystem is
an identifiable - most likely a partition, could be a whole disk, that
has had newfs run on it to create a filesystem structure and then
mounted to some mount point you have created with mkdir.

> Is there some way to allocate larger file systems
> on the target without using sysinstall to prepare
> the target beforehand?

Yes, you use fdisk and bsdlabel and finally newfs.
But, you cannot do this willy-nilly on a disk that is already in use.
This is well documented.

> 
> Is there some command to display
> the file system allocation size?
> 

Oh come on.   This is all over the documentation.

Try:

  df -k  

There are lots of other ways you can look up too.

jerry


> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/restore to clone disk

2010-02-22 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 22/02/2010 08:33, Aiza wrote:
> What happened to swap? The fstab will be showing it as
> the first file system on the hard drive slice.
> Is something missing here?

Swap isn't a filesystem.  There's no persistent content in a swap
partition, so there's nothing to copy.  All you need to do is identify
a partition as a swap area within /etc/fstab, and the system will
initialise it automatically at boot-time.

> What about the file system sizes.
> Will the restored hard drive have the same
> file system sizes as the source file system?

No -- this is not necessary.  So long as the target filesystem is
sufficiently big to contain all of the contents of your dump, it should
work fine.

> Is there some way to allocate larger file systems
> on the target without using sysinstall to prepare
> the target beforehand?

Certainly.  sysinstall(8) really isn't the right tool for this sort of
disk operation once you've got beyond doing an initial installation.
For the default combination of UFS+MBR look at the following man pages:

* fdisk(8) -- create and manage PC slices on the drive
* boot0cfg(8) -- install/configure boot managers (not generally
   needed)
* bsdlabel(8) -- create BSD partition tables within a slice
* newfs(8) -- write a filesystem onto a partition

There are alternatives nowadays: gpart(8) effectively replaces fdisk
and bsdlabel on systems using GPT or EFI or various other
technologies.  zfs(8) similarly replaces bsdlabel and newfs if you want
to use that for managing your disks.

For more information see:


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-adding.html
and succeeding chapters
http://lists.freebsd.org/pipermail/freebsd-geom/2009-April/003440.html
http://wiki.freebsd.org/ZFS

> Is there some command to display
> the file system allocation size?

df(1) shows you the size of filesystems, bsdlabel(8) shows you the size
of the underlying partitions.  Normally the filesystem will completely
fill the partition it is created in, but it is possible to increase the
size of a partition without increasing the size of the filesystem.
There's not much point in doing that, as it just wastes space:
growfs(8) can expand a filesystem to match the enclosing partition.

To see the size of partitions via bsdlabel(1):

   #  bsdlabel da0s1
# /dev/da0s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
  a: 67487663  41943044.2BSD 2048 16384 28552
  b:  41943040  swap
  c: 716819670unused0 0 # "raw" part,
don't edit

'size' is given here in units of 512byte sectors -- so the 'a' partiton
is 32.2GiB.

Cheers,

Matthew


- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuCT00ACgkQ8Mjk52CukIxiBACfWFxImCy9AamOcH3+pafroBCw
404Ani9lZiKoEQzMOx7iQAZycUIS9Wec
=a97y
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/restore to clone disk

2010-02-22 Thread Polytropon
On Mon, 22 Feb 2010 16:33:47 +0800, Aiza  wrote:
> I have seen this posted in the questions archives to be
> used to clone a active system hard drive to a
> USB cabled hard drive.
> 
> 
> 
> Prepare the target
> #dd if=/dev/zero of=/dev/da0 count=2
> # fdisk -BI /dev/da0
> # bsdlabel -B -w da0s1
> # newfs –U /dev/da0s1a   # /
> # newfs -U /dev/da0s1d   # /var
> # newfs -U /dev/da0s1e   # /tmp
> # newfs -U /dev/da0s1f   # /usr
> 
> Mount target file system ‘a’
> # mount /dev/da0s1a /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1a  | restore -rf -
> # cd /
> # umount /mnt
> 
> Mount target file system ‘d’
> # mount /dev/da0s1d /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1d  | restore -rf -
> # cd /
> # umount /mnt
> 
> Mount target file system ‘e’
> # mount /dev/da0s1e /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1e  | restore -rf -
> # cd /
> # umount /mnt
> 
> Mount target file system ‘f’
> # mount /dev/da0s1f /mnt
> # cd /mnt
> # dump -0Lauf - /dev/ad1s1f  | restore -rf -
> # cd /
> # umount /mnt

I'd like to suggest "successive" mounting of the partitions.
E. g. as they are "nested" on the source disk, this can be
done on the target disk, too.

# mount /dev/ad1s1a /mnt
# cd /mnt
# dump -0 -f - /dev/ad0s1a | restore -r -f -

# mount /dev/ad1s1e /mnt/tmp
# cd /mnt/tmp
# dump -0 -f - /dev/ad0s1e | restore -r -f -

# mount /dev/ad1s1f /mnt/var
# cd /mnt/var
# dump -0 -f - /dev/ad0s1f | restore -r -f -

# mount /dev/ad1s1g /mnt/usr
# cd /mnt/usr
# dump -0 -f - /dev/ad0s1g | restore -r -f -

# mount /dev/ad1s1h /mnt/home
# cd /mnt/home
# dump -0 -f - /dev/ad0s1h | restore -r -f -

And then:

# cd /
# umount /mnt/home
# umount /mnt/usr
# umount /mnt/var
# umount /mnt/tmp
# umount /mnt
# sync
# halt

In the above example, transfer is going from ad0 to ad1.



> I have questions about this method.
> 
> What happened to swap? The fstab will be showing it as
> the first file system on the hard drive slice.
> Is something missing here?

The swap partition does not need to be cloned. Furthermore,
I doubt that it is the first partition on the disk, while
it MAY be possible that it is the first entry in /etc/fstab.

The root partition usually refers to partition a, while
the swap partition refers to b.



> What about the file system sizes.
> Will the restored hard drive have the same
> file system sizes as the source file system?

The target partitions should be at least as big as the
source partitions, and they will be filled up to the
point the source partition has data, e. g. partition
/usr is 20 GB and has 10 GB data, and it is dumped and
restored to a new /usr partition with 30 GB space
available, then this new partition will be occupied
1/3 (with 10 GB).



> Is there some way to allocate larger file systems
> on the target without using sysinstall to prepare
> the target beforehand?

Yes, "sade" is such a tool, as well as the usual method
of using fdisk, bsdlabel, and newfs.



> Is there some command to display
> the file system allocation size?

You can always use df -h for this, e. g.

% df -h /var
Filesystem SizeUsed   Avail Capacity  Mounted on
/dev/ad0s1e989M384M527M42%/var

THis should inspire you how to dimension the new partition.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Dump/restore to clone disk

2010-02-22 Thread Aiza

I have seen this posted in the questions archives to be
used to clone a active system hard drive to a
USB cabled hard drive.



Prepare the target
#dd if=/dev/zero of=/dev/da0 count=2
# fdisk -BI /dev/da0
# bsdlabel -B -w da0s1
# newfs –U /dev/da0s1a   # /
# newfs -U /dev/da0s1d   # /var
# newfs -U /dev/da0s1e   # /tmp
# newfs -U /dev/da0s1f   # /usr

Mount target file system ‘a’
# mount /dev/da0s1a /mnt
# cd /mnt
# dump -0Lauf - /dev/ad1s1a  | restore -rf -
# cd /
# umount /mnt

Mount target file system ‘d’
# mount /dev/da0s1d /mnt
# cd /mnt
# dump -0Lauf - /dev/ad1s1d  | restore -rf -
# cd /
# umount /mnt

Mount target file system ‘e’
# mount /dev/da0s1e /mnt
# cd /mnt
# dump -0Lauf - /dev/ad1s1e  | restore -rf -
# cd /
# umount /mnt

Mount target file system ‘f’
# mount /dev/da0s1f /mnt
# cd /mnt
# dump -0Lauf - /dev/ad1s1f  | restore -rf -
# cd /
# umount /mnt


I have questions about this method.

What happened to swap? The fstab will be showing it as
the first file system on the hard drive slice.
Is something missing here?

What about the file system sizes.
Will the restored hard drive have the same
file system sizes as the source file system?

Is there some way to allocate larger file systems
on the target without using sysinstall to prepare
the target beforehand?

Is there some command to display
the file system allocation size?


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: snapshot rsync dump/restore

2009-12-17 Thread Ivan Voras

n dhert wrote:


I was told one could do this using rsync and by using a snapshot it would
even be faster (?)


Also try http://rdiff-backup.nongnu.org/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: snapshot rsync dump/restore

2009-12-17 Thread Roland Smith
On Thu, Dec 17, 2009 at 09:03:50AM +0100, n dhert wrote:
> I want to clone a FreeBSD system on another system.
> Say, Mondaymorning I use the dump(8)  to make dumpfiles of all filesystems
> (dumpofroot.dmp, dumpofvar.dmp, ...tmp.dmp, ...usr.dmp, ...home.dmp ) on an
> external USB disk.

Dumping /tmp is usually not necessary.

> The original system keeps running.
> Then Wednesday I setup FreeBSD on the new system, and use restore(8) to put
> the contents of my dumpfiles in the filesystems of that clone system.

If the new system has different hardware, do not forget to adjust
/boot/loader.conf, or build a custom kernel. And you should definitely edit
/etc/rc.conf if even for the hostname.

> Then I still need to have the changes occured during Mondaymorning till
> Wednesdayafternoon on the original system, to be put in some way on the
> clone system, so that these are not lost.

> How exactly would one best proceed?

I would recommend rsync.

> Is rsync save regarding soft-links ?

Yes, if you use the '-a' flag.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpXk89WkOmYO.pgp
Description: PGP signature


Re: snapshot rsync dump/restore

2009-12-17 Thread Matthew Seaman

n dhert wrote:

I want to clone a FreeBSD system on another system.
Say, Mondaymorning I use the dump(8)  to make dumpfiles of all filesystems
(dumpofroot.dmp, dumpofvar.dmp, ...tmp.dmp, ...usr.dmp, ...home.dmp ) on an
external USB disk.
The original system keeps running.
Then Wednesday I setup FreeBSD on the new system, and use restore(8) to put
the contents of my dumpfiles in the filesystems of that clone system.
Then I still need to have the changes occured during Mondaymorning till
Wednesdayafternoon on the original system, to be put in some way on the
clone system, so that these are not lost.
I was told one could do this using rsync and by using a snapshot it would
even be faster (?)
Is rsync save regarding soft-links ?
How exactly would one best proceed?


Presumably you did a level 0 dump to make your initial copy?  Did you
happen to use the -u flag to dump? ie. update /etc/dumpdates?  If so,
then you can just do an incremental dump of everything that has changed since.
(This is standaard dump(1) functionality).  So long as the filesystems on
the second machine haven't changed in the meantime, you should be able to 
just restore the incremental dump on top of the original full backup

to get things pretty much in synch.  (Although watch out for files that
were deleted between the full and the incremental dumps).

If you didn't update /etc/dumpdates, then you can manually edit /etc/dumpdates
to achieve the same result.

Failing that, yes, you can use rsync to synchronise the filesystem state.
You don't have to snapshot the original system, but it will help to get you
a consistent point-in-time copy of the original server.  To create a snapshotted
and mounted directory tree see the section on 'snapshot' in mount(8).
If you have several filesystems to rsync to the other machine, you should
snapshot all of them and mount them one over the other in the same relation as
the original filesystems.  Then you can rsynch the whole snapshotted directory
tree to your new server in one command.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


snapshot rsync dump/restore

2009-12-17 Thread n dhert
I want to clone a FreeBSD system on another system.
Say, Mondaymorning I use the dump(8)  to make dumpfiles of all filesystems
(dumpofroot.dmp, dumpofvar.dmp, ...tmp.dmp, ...usr.dmp, ...home.dmp ) on an
external USB disk.
The original system keeps running.
Then Wednesday I setup FreeBSD on the new system, and use restore(8) to put
the contents of my dumpfiles in the filesystems of that clone system.
Then I still need to have the changes occured during Mondaymorning till
Wednesdayafternoon on the original system, to be put in some way on the
clone system, so that these are not lost.
I was told one could do this using rsync and by using a snapshot it would
even be faster (?)
Is rsync save regarding soft-links ?
How exactly would one best proceed?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to prepare disk for dump/restore

2009-10-15 Thread PJ
Tobias Rehbein wrote:
> Am Thu, Oct 15, 2009 at 09:17:43PM +0200 schrieb Polytropon:
>   
>> On Thu, 15 Oct 2009 14:59:51 -0400, PJ  wrote:
>>
>> You can use sysinstall from the Fixit CD, too. That's the way
>> I'm mostly doing this kind of thing: Preparing the disk with
>> the sysinstall tool, then dropping to CLI for the restoring
>> process.
>> 
>
> If all you want to do is to prepare the disks you can leave sysinstall alone 
> and
> use sade(8).
>
>   
Hmmm, very, very interesting... Will check it out. 8-)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to prepare disk for dump/restore

2009-10-15 Thread PJ
Polytropon wrote:
> On Thu, 15 Oct 2009 14:59:51 -0400, PJ  wrote:
>   
>> I would like to just partition, label and newfs the disk; livefs wants
>> to waste my time by installing other stuff like the kernel & man pages
>> etc that I have not even selected;
>> 
>
> Just don't go through the whole installation cycle; from the
> sysinstall main menu, select "Custom" and perform slicing
> (setting disk active, adding standard MBR) and partitioning
> (creating partitions, format them with "w" or "z"). Then
> leave the menu and use the shell. You can get to the "Fdisk"
> and "Label" through "Configure" in the main menu, too.
>
>
>
>   
>> and if I use postinstall
>> configuration, that doesn't do anything. Or should I use fixit and then
>> do the manual thing?
>> 
>
> You can use sysinstall from the Fixit CD, too. That's the way
> I'm mostly doing this kind of thing: Preparing the disk with
> the sysinstall tool, then dropping to CLI for the restoring
> process.
>
>
>
>   
>> Sysinstall requires already being booted... ???
>> 
>
> No. You can execute it even on a running system.
>   
That's what I meant. :-)
>
>
>   
>> Or do I do it manually as per Polytropon's recipe of fdisk, bsdlabel,
>> newfs  mount, dump/restore and use/play? ;-)
>> 
>
> This method is quite usable when you completely understood what
> you're doing; furthermore, it enables scripting automated
> processes, which is very handy especially when you want to
> provide larger numbers of cloned systems.
>
> In any case: Be sure which device you're operating on, and keep
> in mind that it may (!) be a different device when in the place
> where it should go.
>
> For example, if you intend to prepare a disk to be ad4 in the
> target system, let it be (if possible) ad4 in the source system,
> and boot your source system from ad12. From this running system,
> perform the cloning. If everything is done, check references
> for ad12 and change them to ad4 (even *that* can be scripted);
> eyes on /etc/fstab. After you've done everything, shut down the
> running system, unplug ad12 and let the system boot from ad4.
> Everything should be alright now. Extract ad4 and take it to
> its new system.
>   
I think i'm at the stage where my stumbling is beginning to get
straightened out... ;-)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to prepare disk for dump/restore

2009-10-15 Thread Polytropon
On Thu, 15 Oct 2009 21:31:20 +0200, Tobias Rehbein  
wrote:
> If all you want to do is to prepare the disks you can leave sysinstall alone 
> and
> use sade(8).

Very good advice! Sadly, it makes me feel that all my knowledge
is very outdated because sade didn't come into my mind at fist
place. :-)

The use of sysinstall is just a suggestion when you're booting
from a FreeBSD live file system, so you end up in sysinstall
anyway. On a system already running, sade definitely is the
better tool.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to prepare disk for dump/restore

2009-10-15 Thread Tobias Rehbein
Am Thu, Oct 15, 2009 at 09:17:43PM +0200 schrieb Polytropon:
> On Thu, 15 Oct 2009 14:59:51 -0400, PJ  wrote:
> 
> You can use sysinstall from the Fixit CD, too. That's the way
> I'm mostly doing this kind of thing: Preparing the disk with
> the sysinstall tool, then dropping to CLI for the restoring
> process.

If all you want to do is to prepare the disks you can leave sysinstall alone and
use sade(8).

-- 
Tobias Rehbein

PGP key: 4F2AE314
server:  keys.gnupg.net
fingerprint: ECDA F300 1B6E 9B87 8524  8663 E8B6 3138 4F2A E314


pgpXD2nA0ImOP.pgp
Description: PGP signature


Re: how to prepare disk for dump/restore

2009-10-15 Thread Polytropon
On Thu, 15 Oct 2009 14:59:51 -0400, PJ  wrote:
> I would like to just partition, label and newfs the disk; livefs wants
> to waste my time by installing other stuff like the kernel & man pages
> etc that I have not even selected;

Just don't go through the whole installation cycle; from the
sysinstall main menu, select "Custom" and perform slicing
(setting disk active, adding standard MBR) and partitioning
(creating partitions, format them with "w" or "z"). Then
leave the menu and use the shell. You can get to the "Fdisk"
and "Label" through "Configure" in the main menu, too.



> and if I use postinstall
> configuration, that doesn't do anything. Or should I use fixit and then
> do the manual thing?

You can use sysinstall from the Fixit CD, too. That's the way
I'm mostly doing this kind of thing: Preparing the disk with
the sysinstall tool, then dropping to CLI for the restoring
process.



> Sysinstall requires already being booted... ???

No. You can execute it even on a running system.



> Or do I do it manually as per Polytropon's recipe of fdisk, bsdlabel,
> newfs  mount, dump/restore and use/play? ;-)

This method is quite usable when you completely understood what
you're doing; furthermore, it enables scripting automated
processes, which is very handy especially when you want to
provide larger numbers of cloned systems.

In any case: Be sure which device you're operating on, and keep
in mind that it may (!) be a different device when in the place
where it should go.

For example, if you intend to prepare a disk to be ad4 in the
target system, let it be (if possible) ad4 in the source system,
and boot your source system from ad12. From this running system,
perform the cloning. If everything is done, check references
for ad12 and change them to ad4 (even *that* can be scripted);
eyes on /etc/fstab. After you've done everything, shut down the
running system, unplug ad12 and let the system boot from ad4.
Everything should be alright now. Extract ad4 and take it to
its new system.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


how to prepare disk for dump/restore

2009-10-15 Thread PJ
I would like to just partition, label and newfs the disk; livefs wants
to waste my time by installing other stuff like the kernel & man pages
etc that I have not even selected; and if I use postinstall
configuration, that doesn't do anything. Or should I use fixit and then
do the manual thing?
Sysinstall requires already being booted... ???
Or do I do it manually as per Polytropon's recipe of fdisk, bsdlabel,
newfs  mount, dump/restore and use/play? ;-)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: clone-dump-restore

2009-10-15 Thread Jerry McAllister
On Wed, Oct 14, 2009 at 09:29:42PM -0400, PJ wrote:

> I believe that my problems arise out of subliminal refuse syndrome: the
> brain refuses to comprehend dump and restore TOs and FROMs.
> In other words, I'm beginning to see that
> dump -0af TO ( - or device/file) FROM (device or directory/file)
> and
> restore -rf  (TO curr.dir FROM device or file) 
> 
> or
> dump -0af  - (FROM device or file) | restore  -rf - (TO device or directory)
> 
> or do I still not have it right?
> It's the stdout and stdin that makes me stumble.
> Do I really need to mount the partitions or can I just dump and restore
> from device to device directly?
> The manual says I should be able to dump & restore across the lan too...

Basically. on dump, the filesystem to be dumped comes last 
on the command line.  
The place to write the dump is that which is named right after the -f
If there is no -f then it defaults to a tape device.
If a '-' follows the -f, then it writes to standard out.
The name must be the first thing after the -f or it will get confused.

On restore, there is no filesystem name to come last.  You have
to be cd-ed to where you want it written.  So, the only thing to
consider is its  -f.  For restore, that tells from where to read.
If it is a device or file name, it reads from that.  If it is  '-'
it reads from standard in.   If there is no -f it defaults to the
tape device.  
Again, the name must be the first thing after the -f if there is a -f.

The pipe '|' tells the system to take the standard out from the first
process and feed it to the standard in of the second.  That passing is 
not a function of dump/restore, but of the system.   The pipe just
passes data.  It doesn't force the utilities (dump or restore) to do
anything about it.   But, putting the '-' on dump and restore tells
them to pay attention to standard out/in.

You can cause dump to send standard out over the net and restore to
read standard in from the net.I used to do that, but it has been
a long time and I don't have time at the moment to go and check the
details to make sure I tell it correctly.

jerry


> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: clone-dump-restore

2009-10-14 Thread Polytropon
On Wed, 14 Oct 2009 21:29:42 -0400, PJ  wrote:
> I believe that my problems arise out of subliminal refuse syndrome: the
> brain refuses to comprehend dump and restore TOs and FROMs.
> In other words, I'm beginning to see that
> dump -0af TO ( - or device/file) FROM (device or directory/file)
> and
> restore -rf  (TO curr.dir FROM device or file) 
> 
> or
> dump -0af  - (FROM device or file) | restore  -rf - (TO device or directory)
> 
> or do I still not have it right?

Not entirely. Let me give this little "cheat sheet":

# dump -0 -a -f  
if  is -, then write to standard output

# cd 
# restore -r -f 
if  is -, then read to standard input

and combined:
# cd 
# dump -0 -a -f -  | restore -r -f -

A common command line parametron for dump -0Lauf ("Lauf"
means "(the) run" or imperative "run!" in German, so it's
easy to remember, "Null-Lauf!" or "Zero Lauf"). Check
the manpage at "man dump" for the meaning of the different
options which are often used for some welcome "side effects".

And now: Lauf! Lauf! Lauf! :-)



> It's the stdout and stdin that makes me stumble.

It's quite easy if you recognize what stdin and stdout are.
One program (dump) outputs to stdout, the | (pipe) method
redirects this stdout of one program to another program to
which it is the stdin, so this other program (restore) reads
the stdin.



> Do I really need to mount the partitions or can I just dump and restore
> from device to device directly?

No. For direct full device operations, you would need dd.

The reason is that dump reads from a partition. This partition
should be unmounted, but may be mounted if you specify -L in
order to tell dump that it will dump a live file system and
should therefore create a snapshot, because it simply cannot
dump data that is constantly changing. The restore program
reads dump files and creates directories and files (with all
the stuff like owner:group, permissions and flags), so it has
to operate on a mounted file system.

That's why the rule: source not mounted or -L, destination
mounted and writable (and empty).

The dd program operates on blocks of variable size. It has no
concept of files and directories. It should not be used on
mounted partitions. Unlike dump | restore, dd allows you to
duplicate disks fulwise, this means you don't even have to 
care for slices and partitions. This method is very often used
in forensic settings where you need to duplicate a whole disk.
But you can, if needed, just dd a whole (at file level defective)
partition, as I had to do. The dd program does not care for
such problems. There are "extended dd variants" that can cope
with massive reading errors if the source drive is already
physically failing.



> The manual says I should be able to dump & restore across the lan too...

Yes, that's easy. For example, you can use ssh to connect to
another machine where you get the dump files from. The handbook
even lists an example, if I remember correctly. In such a
setting, you usually prepare the target (slice, partition,
format), mount it, connect to the backup server and let
restore take the dump files from there. This process can
even be scripted, so you simply put a CD or an USB stick into
a new computer and let it rock automatically. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: clone-dump-restore

2009-10-14 Thread PJ
I believe that my problems arise out of subliminal refuse syndrome: the
brain refuses to comprehend dump and restore TOs and FROMs.
In other words, I'm beginning to see that
dump -0af TO ( - or device/file) FROM (device or directory/file)
and
restore -rf  (TO curr.dir FROM device or file) 

or
dump -0af  - (FROM device or file) | restore  -rf - (TO device or directory)

or do I still not have it right?
It's the stdout and stdin that makes me stumble.
Do I really need to mount the partitions or can I just dump and restore
from device to device directly?
The manual says I should be able to dump & restore across the lan too...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: clone-dump-restore

2009-10-14 Thread Polytropon
On Wed, 14 Oct 2009 17:21:57 -0400, PJ  wrote:
> It has taken me some time to prepare for a cloning of an existing 7.2 sytem.
> Now that I have everything running smoothly with all the proggies &
> configurations the way I want them, I tried (notice - tried) to clone
> the system.
> Here's the setup:
> FBSD 7.2 on ad4 and same on ad12.

I do assume that the system on ad6 is your source system, and
ad12 should then be the same by the means of cloning? In later
lines, you're dumping to a da device (not ad). Do you already
have two FreeBSD source systems set up?



> First, running on ad4, I tried to dump & restore each partition directly:
> ad12s1a to da0s1a (usb sata disk).  No go.

It would be good to see the command that you issued to do so,
including the currend working directory.



> I had set it up originally
> with livefs, minimal; then redid it all with fdisk, bsdlabel and nwfs;

There's no need to do the slicing and partitioning twice.



> then
> dump -0af - /dev/ad12s1a | restore -rf - /dev/da0s1a

The command does not look okay. Keep in mind that
a) ad0s1a is mounted,
b) you need to be in the mounted / of da0 and
c) ad1s2a is mounted ro.

You can forget about c) if you're dumping | restoring from a live
file CD or DVD. In this case, ad12s1a isn't mounted, which is
good.

You should end up with a setting like this:

# mount /dev/da0s1a /mnt
# cd /mnt
# dump -0 -f - /dev/ad12s1a | restore -r -f -

See the difference? The restore command does NOT require a device
name, because the point where to restore is the current working
directory, as indicated by the previous cd command.



> --- got error messages about not being a tape device. Great.

Looks like incorrect command... see above.



> Next, I tried with another usb/sata disk on da0... dumped to files (dump
> went w/out problems) ... mounted da0 partitions 1 x 1 to /mnt, cd'd to
> /mnt and did
> restore -rf file.
> Only the ad12s1f(usr) restore gave long list of "unable to create file> or 
> link > or something like that".

Again, the complete command (including pwd) would have been
helpful, so I can only guess.

I assume you dumped /usr into a file on a usb disk (da). In order
to restore this file to a partition you created on another disk,
let's say ad6 (ATTENTION, EXAMPLE!), the command to do so would
be:

# mount /dev/da0 /mnt
# mkdir /mnt2
# mount /dev/ad6s1e /mnt2
# cd /mnt2
# restore -r -f /mnt/usr.dump

Keep in mind that (in difference to my previous example) /mnt now
refers to the /usr partition, not to /.

This of course assumes that you've already sliced and partitioned
ad6. It includes formatting (newfs), obviously.



> When I then installed the restored disk to another computer (identical
> except for CPU (3gb instead of 2.4gb), booted from the restored disk and
> saw that it was trying to boot from ad12s1a which doesn't exist on the
> new machine. uh...oh...

The boot loader tries to boot the first ATA disk. This has been
discussed in the questions@ list few days ago.



> Somehow I think I may not have understood something.

I'm sure about this. Re-read the examples above and you'll notice
easily how the dump and especially the restore command have to be
invoked for proper operations.



> Perhaps I should install the disk directly in the dump/restore machine
> and try again.

This is possible, but as long as you're using an USB transfer disk
which gets its content as data files (.dump files) from the ATA
disk (source disk), and which are then restored to another ATA
disk (target disk), there shouldn't be a problem.

Because I'm a lazy guy, I mostly use a live file system (FreeBSD
live fs is completely okay, but FreeSBIE is good, too) in order to
run the sysinstall program which I use to slice, partition and format
the target disk as intended. I then use a USB stick or a USB disk
to make the dump files available (previous example) and restore them
to the target disk. Note that things like the boot loader are now
independent of my dumps as they get written by sysinstall.



> Oh, yes, another sign from the gods... when restoring to a partition
> just newfsed there is a warning that .snap is already installed... now
> what on earth or moon is that?

The .snap directory is used for file system snapshot. As far as
I remember, newfs creates this directory, or maybe it's fsck at
its first run? Don't mind, it's not important (until you need it
for data recovery).


> I will try again... and try to document more clearly... :-(

Yes, please.



Good luck!




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


clone-dump-restore

2009-10-14 Thread PJ
Gentlemen,
I have not had a chance to thank you for your very helpful suggestions.
I have tried to follow them as well as possible and I cerainly am
grateful for your input.
It has taken me some time to prepare for a cloning of an existing 7.2 sytem.
Now that I have everything running smoothly with all the proggies &
configurations the way I want them, I tried (notice - tried) to clone
the system.
Here's the setup:
FBSD 7.2 on ad4 and same on ad12.
First, running on ad4, I tried to dump & restore each partition directly:
ad12s1a to da0s1a (usb sata disk).  No go. I had set it up originally
with livefs, minimal; then redid it all with fdisk, bsdlabel and nwfs; then
dump -0af - /dev/ad12s1a | restore -rf - /dev/da0s1a
--- got error messages about not being a tape device. Great.
Next, I tried with another usb/sata disk on da0... dumped to files (dump
went w/out problems) ... mounted da0 partitions 1 x 1 to /mnt, cd'd to
/mnt and did
restore -rf file.
Only the ad12s1f(usr) restore gave long list of "unable to create file
or link or something like that".
When I then installed the restored disk to another computer (identical
except for CPU (3gb instead of 2.4gb), booted from the restored disk and
saw that it was trying to boot from ad12s1a which doesn't exist on the
new machine. uh...oh...
Somehow I think I may not have understood something.
Perhaps I should install the disk directly in the dump/restore machine
and try again.
Oh, yes, another sign from the gods... when restoring to a partition
just newfsed there is a warning that .snap is already installed... now
what on earth or moon is that?
I will try again... and try to document more clearly... :-(
TIA
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Re: Dump/Restore?

2009-09-14 Thread utisoft

On 14 Sep 2009 23:14, Polytropon  wrote:

On Mon, 14 Sep 2009 22:02:49 +, utis...@googlemail.com wrote:



> Yeah, unfortunately I still think of 'folders', and am continually


> wrong-footed by the term 'directory' in a graphical environment, even  
after



> years of GNU and FreeBSD use.





Just imagine if the Xerox Alto and its first GUI wouldn't have



been invented in the US, but in Germany. Then we would refer



to "ring binders" or "lever arch folders", or "ordners" or



"actenordner" (the german word is "der Ordner" or "der Akten-



ordner"). Surely, this would be the default symbol:





http://www.officexl.de/kopierpapier/images/ordner.jpg





And all paper sizes defaults would refer to DIN A4 in the first



place... what a beautiful imagination! :-)








> I have all sorts of strange habits that many will recognise as symptoms  
of



> multi-booting and running servers. There's no shame in that!





Please don't get me wrong: There are correct places to use the



term "folder", eg when talking about "mail folders" (which can



be represented as files (mbox) or directories with files (MH) on



the disk level). But in the case discussed, "directory" is the



correct term. There's no need to change proven terminology just



because some company indoctrinates you to do so. :-)





How important it is to use the correct terminology is when users



start asking you questions about their "modems" (refers to PC),



their "TV" and their "brains" (refers to speakers), or start



complaining that "the file system is too big" (refers to the



icon size in the file manager used), and want "the same pictures



at home as I have them at work" (refers to the OS).





To sum it up in quite your own words: "I have all sorts of strange



habits that many will recognise as symptoms of asperger's syndrome.



There's no shame in that!" :-)




Certainly no shame in that, but also one should be corrected on errors of  
terminology. Sorry if I didn't make that clear (I didn't!). I merely meant  
to point out that the best of us make terminological errors, and that it's  
all part of our 'diversity'. However, you were still right to correct the  
term IMO.


Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Polytropon
On Mon, 14 Sep 2009 22:02:49 +, utis...@googlemail.com wrote:
> Yeah, unfortunately I still think of 'folders', and am continually  
> wrong-footed by the term 'directory' in a graphical environment, even after  
> years of GNU and FreeBSD use.

Just imagine if the Xerox Alto and its first GUI wouldn't have
been invented in the US, but in Germany. Then we would refer
to "ring binders" or "lever arch folders", or "ordners" or
"actenordner" (the german word is "der Ordner" or "der Akten-
ordner"). Surely, this would be the default symbol:

http://www.officexl.de/kopierpapier/images/ordner.jpg

And all paper sizes defaults would refer to DIN A4 in the first
place... what a beautiful imagination! :-)



> I have all sorts of strange habits that many will recognise as symptoms of  
> multi-booting and running servers. There's no shame in that!

Please don't get me wrong: There are correct places to use the
term "folder", e. g. when talking about "mail folders" (which can
be represented as files (mbox) or directories with files (MH) on
the disk level). But in the case discussed, "directory" is the
correct term. There's no need to change proven terminology just
because some company indoctrinates you to do so. :-)

How important it is to use the correct terminology is when users
start asking you questions about their "modems" (refers to PC),
their "TV" and their "brains" (refers to speakers), or start
complaining that "the file system is too big" (refers to the
icon size in the file manager used), and want "the same pictures
at home as I have them at work" (refers to the OS).

To sum it up in quite your own words: "I have all sorts of strange
habits that many will recognise as symptoms of asperger's syndrome.
There's no shame in that!" :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Re: Dump/Restore?

2009-09-14 Thread utisoft

On 14 Sep 2009 22:38, Richard Mahlerwein  wrote:

--- On Mon, 9/14/09, Polytropon free...@edvax.de> wrote:





From: Polytropon free...@edvax.de>



Subject: Re: Dump/Restore?



To: mahle...@yahoo.com



Cc: freebsd-questions@freebsd.org, "Chris Maness" ch...@chrismaness.com>



Date: Monday, September 14, 2009, 4:37 PM




On Mon, 14 Sep 2009 05:45:01 -0700 (PDT), Richard Mahlerwein  
mahle...@yahoo.com> wrote:



> In the "restore > : prompt you can



>



> "add "



>



> to add it to the restore list. Works with folders, too.







Excuse me, just a little terminology note: FreeBSD has directories,



not folders. It doesn't have sheets of papers instead of files,



too. :-)





Pie on my face. I work too much with multiple operating systems. *sigh*




BTW, I also work and develop heavily with a (non BSD, non-open source)  
document imaging and workflow management software, so you probably will,  
at some point, see me confuse files and sheets of paper. I will not mind  
a gentle reminder just like the above when I do that . :)



Yeah, unfortunately I still think of 'folders', and am continually  
wrong-footed by the term 'directory' in a graphical environment, even after  
years of GNU and FreeBSD use.


I have all sorts of strange habits that many will recognise as symptoms of  
multi-booting and running servers. There's no shame in that!


Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Richard Mahlerwein
--- On Mon, 9/14/09, Polytropon  wrote:

From: Polytropon 
Subject: Re: Dump/Restore?
To: mahle...@yahoo.com
Cc: freebsd-questions@freebsd.org, "Chris Maness" 
Date: Monday, September 14, 2009, 4:37 PM

On Mon, 14 Sep 2009 05:45:01 -0700 (PDT), Richard Mahlerwein 
 wrote:
> In the "restore > : prompt you can 
> 
> "add "
> 
> to add it to the restore list.  Works with folders, too.
                                             
Excuse me, just a little terminology note: FreeBSD has directories,
not folders. It doesn't have sheets of papers instead of files,
too. :-)

Pie on my face.  I work too much with multiple operating systems.  *sigh*

BTW, I also work and develop heavily with a (non BSD, non-open source) document 
imaging and workflow management software, so you probably will, at some point, 
see me confuse files and sheets of paper.  I will not mind a gentle reminder 
just like the above when I do that . :)





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Polytropon
On Mon, 14 Sep 2009 05:45:01 -0700 (PDT), Richard Mahlerwein 
 wrote:
> In the "restore > : prompt you can 
> 
> "add "
> 
> to add it to the restore list.  Works with folders, too.
 
Excuse me, just a little terminology note: FreeBSD has directories,
not folders. It doesn't have sheets of papers instead of files,
too. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Jerry McAllister
On Sun, Sep 13, 2009 at 06:50:05PM -0700, Chris Maness wrote:

> On Sun, Sep 13, 2009 at 6:15 PM, Chris Maness  wrote:
> > I level 0 dump of my server.  I lost a file that I need back.  Is it
> > possible to use restore like tar and explode it into a directory
> > instead of a pristine partition/mount?  Or even better, is it possible
> > to just extract a single file without exploding the whole tape dump?
> >
> > Sorry if the question seems stupid.
> >
> > Chris KQ6UP
> >
> 
> Sorry, I was reading the restore man from my mac, and it was not as
> clear.  The restore does not seem to work from my mac (this is where
> my backup dumps reside as I have two massive HDs).  I guess the mac
> restore would only work with HFS+ and not UFS.  I guess the only way
> would be to move the massive dump file back over to the FreeBSD
> server.

The dump is just a file and it should not matter where it is
stored, but you will have to use some network access type thing
such as an rsh or an NFS connection to read it.

Another thing is that restores need to be done on the same OS
that the dumps were written - regardless of where they are stored.
dump/restore depends on knowing something about the underlying
filesystem, so it is not transferable from one system to another
and often even between one OS version to another, like tar tends
to be.But, you can make the dump file move between where it is 
stored and a system that can restore from it using one of the 
network protocols.

jerry


> 
> Thanks,
> Chris KQ6UP
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Jerry McAllister
On Sun, Sep 13, 2009 at 06:15:55PM -0700, Chris Maness wrote:

> I level 0 dump of my server.  I lost a file that I need back.  Is it
> possible to use restore like tar and explode it into a directory
> instead of a pristine partition/mount?  Or even better, is it possible
> to just extract a single file without exploding the whole tape dump?

Yes, it is easily done. 
Just use the 'interactive' option.   


First, be clear where you want the restores file[s] to go.
The official way to do the interactive option is to cd in to
the bottom level of the filesystem it is in and do it from there.
Restore will then put the files in the directories where they
were when the dump was made.  So, if the file[s] were in /home/joes/files/
cd to /home and do the restore.   It will take care of knowing 
about the joes and files subdirectories and build them if they
are not there.

But, really the general recommended way (and the way I do it) to do 
an interactive restore is to create a designated directory for it
and cd in to that.   It can be anywhere there is room for the files.

So, for example, on some systems I have a large amount of extra space
in a filesystem I mount as /work.   Within that I create a directory
I can recover  (for lack of any more imaginative name).  I cd to
the /work/recover directory and do the interactive restore.

eg do:   

   cd /work/recover
   restore -if  dump_device/file

Then fish around amongst the directories.   When you find the one[s] you
need to restore, just do 
  add filename
You can keep going and add several files and directories.  
When you have all that you want/need, then type
  extract

It will ask you what tape to start with.  If the dump is a file
or of there is only one tape or other device, type 1 If there are 
more than one tape, type in the number of the last tape.  It will
search backward through the list of tapes/devices until it finds the
files.  eg.   if there are 7 tapes in the level 0 dump set, start
with 7, then give it 6 and then 5, etc.   It will quit asking when
it finds the files.

Finally, it will ask if you want to set ownership of .
Say no unless you have a good reason for doing otherwise.

Now, if you have used a separate directory as I suggest above, 
tell restore to quit and then look at the file[s] to make sure
they are all right and then manually move then to whichever directory
you want.   You can then delete them from /work/recover but leave
that directory around for when you need it again.   

This is good for any circumstance when you want to pull just one
of a few files out of a dump (or a tar file).

I do a similar thing when I untar stuff I have moved over.
I make a  /work/unroll  directory and untar stuff in there
and move whay I want to where I want it.  

This may seem to be an extra unnecessary step, but it cuts down
on errors, in my handling directories and file locations.

jerry

> 
> Sorry if the question seems stupid.
> 
> Chris KQ6UP
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Chris Rees
2009/9/14 Chris Maness :
> utis...@googlemail.com wrote:
>>
>> On 14 Sep 2009 02:50, Chris Maness  wrote:
>> > On Sun, Sep 13, 2009 at 6:15 PM, Chris Maness ch...@chrismaness.com>
>> > wrote:
>> >
>> > > I level 0 dump of my server.  I lost a file that I need back.  Is it
>> >
>> > > possible to use restore like tar and explode it into a directory
>> >
>> > > instead of a pristine partition/mount?  Or even better, is it possible
>> >
>> > > to just extract a single file without exploding the whole tape dump?
>> >
>> > >
>> >
>> > > Sorry if the question seems stupid.
>> >
>> > >
>> >
>> > > Chris KQ6UP
>> >
>> > >
>> >
>> >
>> >
>> > Sorry, I was reading the restore man from my mac, and it was not as
>> >
>> > clear.  The restore does not seem to work from my mac (this is where
>> >
>> > my backup dumps reside as I have two massive HDs).  I guess the mac
>> >
>> > restore would only work with HFS+ and not UFS.  I guess the only way
>> >
>> > would be to move the massive dump file back over to the FreeBSD
>> >
>> > server.
>> >
>> >
>> >
>> > Thanks,
>> >
>> > Chris KQ6UP
>> >
>> > ___
>>
>> Try using NFS or cat over ssh, something like
>>
>> $ ssh my_mac 'cat dumpfile' | restore -if -
>>
>> restore treats the file as a tape, so it doesn't pull any bytes until you
>> ask it to. This should be the least network intensive way of doing it
>>
>>
>> Good luck!
>>
>> Chris
>
> Thanks, that looks like a pretty cool trick.
>
> Chris
>

Let me know how you get on with it, I gzip my dumps and can pipe
together commands like that, so it should work!

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in a mailing list?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Richard Mahlerwein
--- On Sun, 9/13/09, Chris Maness  wrote:

>From: Chris Maness 

>Subject: Re: Dump/Restore?

>To: freebsd-questions@freebsd.org

>Date: Sunday, September 13, 2009, 9:50 PM

>

>On Sun, Sep 13, 2009 at 6:15 PM, Chris Maness  wrote:
>> I level 0 dump of my server.  I lost a file that I need back.  Is it
>> possible to use restore like tar and explode it into a directory
>> instead of a pristine partition/mount?  Or even better, is it possible
>> to just extract a single file without exploding the whole tape dump?
>>
>> Sorry if the question seems stupid.
>>
>> Chris KQ6UP
>Sorry, I was reading the restore man from my mac, and it was not as
>clear.  The restore does not seem to work from my mac (this is where
>my backup dumps reside as I have two massive HDs).  I guess the mac
>restore would only work with HFS+ and not UFS.  I guess the only way
>would be to move the massive dump file back over to the FreeBSD
>server.


If the dump was made on the mac, it's highly likely restore will need to be run 
from the mac.  If it was made on freebsd, you'll likely need to run restore 
from freebsd.  Assuming you run it from the appropriate place..  


I don't have my Mac handy to check it's man pages, but in FreeBSD I believe in 
it that it would be 

#restore -i -f 
  or 
#restore -i 

Then use 'ls' and 'cd' to find the file you want.



In the "restore > : prompt you can 

"add "

to add it to the restore list.  Works with folders, too.



"extract"

to finally pull those out.


YMMV, so read the docs. I would suspect the Mac has similar options, though 
can't confirm that at the moment.

-Rich


  

  









___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-14 Thread Chris Maness

utis...@googlemail.com wrote:

On 14 Sep 2009 02:50, Chris Maness  wrote:
> On Sun, Sep 13, 2009 at 6:15 PM, Chris Maness ch...@chrismaness.com> 
wrote:

>
> > I level 0 dump of my server.  I lost a file that I need back.  Is it
>
> > possible to use restore like tar and explode it into a directory
>
> > instead of a pristine partition/mount?  Or even better, is it possible
>
> > to just extract a single file without exploding the whole tape dump?
>
> >
>
> > Sorry if the question seems stupid.
>
> >
>
> > Chris KQ6UP
>
> >
>
>
>
> Sorry, I was reading the restore man from my mac, and it was not as
>
> clear.  The restore does not seem to work from my mac (this is where
>
> my backup dumps reside as I have two massive HDs).  I guess the mac
>
> restore would only work with HFS+ and not UFS.  I guess the only way
>
> would be to move the massive dump file back over to the FreeBSD
>
> server.
>
>
>
> Thanks,
>
> Chris KQ6UP
>
> ___

Try using NFS or cat over ssh, something like

$ ssh my_mac 'cat dumpfile' | restore -if -

restore treats the file as a tape, so it doesn't pull any bytes until 
you ask it to. This should be the least network intensive way of doing 
it



Good luck!

Chris 

Thanks, that looks like a pretty cool trick.

Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Re: Dump/Restore?

2009-09-13 Thread utisoft

On 14 Sep 2009 02:50, Chris Maness  wrote:
On Sun, Sep 13, 2009 at 6:15 PM, Chris Maness ch...@chrismaness.com>  
wrote:



> I level 0 dump of my server. I lost a file that I need back. Is it



> possible to use restore like tar and explode it into a directory



> instead of a pristine partition/mount? Or even better, is it possible



> to just extract a single file without exploding the whole tape dump?



>



> Sorry if the question seems stupid.



>



> Chris KQ6UP



>





Sorry, I was reading the restore man from my mac, and it was not as



clear. The restore does not seem to work from my mac (this is where



my backup dumps reside as I have two massive HDs). I guess the mac



restore would only work with HFS+ and not UFS. I guess the only way



would be to move the massive dump file back over to the FreeBSD



server.





Thanks,



Chris KQ6UP



___


Try using NFS or cat over ssh, something like

$ ssh my_mac 'cat dumpfile' | restore -if -

restore treats the file as a tape, so it doesn't pull any bytes until you  
ask it to. This should be the least network intensive way of doing it



Good luck!

Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore?

2009-09-13 Thread Chris Maness
On Sun, Sep 13, 2009 at 6:15 PM, Chris Maness  wrote:
> I level 0 dump of my server.  I lost a file that I need back.  Is it
> possible to use restore like tar and explode it into a directory
> instead of a pristine partition/mount?  Or even better, is it possible
> to just extract a single file without exploding the whole tape dump?
>
> Sorry if the question seems stupid.
>
> Chris KQ6UP
>

Sorry, I was reading the restore man from my mac, and it was not as
clear.  The restore does not seem to work from my mac (this is where
my backup dumps reside as I have two massive HDs).  I guess the mac
restore would only work with HFS+ and not UFS.  I guess the only way
would be to move the massive dump file back over to the FreeBSD
server.

Thanks,
Chris KQ6UP
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Dump/Restore?

2009-09-13 Thread Chris Maness
I level 0 dump of my server.  I lost a file that I need back.  Is it
possible to use restore like tar and explode it into a directory
instead of a pristine partition/mount?  Or even better, is it possible
to just extract a single file without exploding the whole tape dump?

Sorry if the question seems stupid.

Chris KQ6UP
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump | Restore

2009-04-20 Thread Michael Powell
Tim Judd wrote:

[snip] 
> Long story short, BTX is what brings the PC BIOS/CMOS code execution from
> 16-bit real mode, to 32-bit protected mode.
> 
> I've had repeated problems with name-brand PCs that result in a BTX
> halted. Whiteboxes/custom builds tend to work the best (and IMHO, last the
> longest).
[snip]

Often the so called "name-brand" PCs have quirky and inferior BIOS, as well 
as minor hardware glitches that sometimes get ironed out with subsequent 
chipset steppings.

Since these are primarily manufactured and sold for the Windows crowd, 
Windows will mask many of these deficiencies. Have problem xyz-1001 with 
$mfr model blah and many times the answer is "download $mfr driver revision 
so and so". This is where a known small hardware defect can be worked around 
in driver code to mask and hide the problem. This is Windows centric and if 
you're not using Windows then you're not supported.

-Mike
  


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump | Restore

2009-04-20 Thread Tim Judd
Greetings,

On Mon, Apr 20, 2009 at 4:31 AM, Daniels Vanags
wrote:

>
>
>   Unable to successfully dump | restore over ssh. Source machine
> FreeBSD 6.2, disk /dev/mirror/gm0s1a,
>
>  target machine FreeBSD 6.2, target disk /dev/ad1s1a mounted on /mnt.
>
>  Run dump -0aLf - / | ssh ip_address ''cd /mnt/ && cat | restore - rf
> -'',  dump/restore goes without any errors.
>
>  Fstab fixed, but system failure to boot: BTX halted.
>
>  Please help.
>
>


I read up on what the BTX is.  BooT eXtender -- url here
http://www.freebsd.org/doc/en/books/arch-handbook/boot-boot2.html


Long story short, BTX is what brings the PC BIOS/CMOS code execution from
16-bit real mode, to 32-bit protected mode.

I've had repeated problems with name-brand PCs that result in a BTX halted.
Whiteboxes/custom builds tend to work the best (and IMHO, last the longest).



So asking the OP to flag slices or bsdlabels as bootable probably won't
help, but I've been wrong before.  :D
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump | Restore

2009-04-20 Thread Mel Flynn
On Monday 20 April 2009 14:59:55 cpghost wrote:
> On Mon, Apr 20, 2009 at 12:46:05PM +0200, Wojciech Puchar wrote:
> > use rsh not ssh unless you really need encryption.
>
> Sure, you *could* do that, but be sure to encrypt *and* sign the
> backup stream beforehand, e.g. using openssl or gnupg... And even
> then, anyone sniffing that poorly encrypted (at layer 2) wireless LAN
> connection could still hijack the password, log into the backup host,
> and delete or corrupt the (encrypted) dump files.
>
> Perhaps it's better to use ssh anyway, even for encrypted and signed
> dump files. Creating and transfering a couple of key files to the
> clients and backup host and using ssh(1) is not hard. Really not. ;-)

But doesn't use full network capacity. Closed circuit LAN's (yes, they still 
do exist) don't need ssh, but a level 0 dump of several TB of data does need 
full lan speed.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump | Restore

2009-04-20 Thread cpghost
On Mon, Apr 20, 2009 at 12:46:05PM +0200, Wojciech Puchar wrote:
> use rsh not ssh unless you really need encryption.

Sure, you *could* do that, but be sure to encrypt *and* sign the
backup stream beforehand, e.g. using openssl or gnupg... And even
then, anyone sniffing that poorly encrypted (at layer 2) wireless LAN
connection could still hijack the password, log into the backup host,
and delete or corrupt the (encrypted) dump files.

Perhaps it's better to use ssh anyway, even for encrypted and signed
dump files. Creating and transfering a couple of key files to the
clients and backup host and using ssh(1) is not hard. Really not. ;-)

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump | Restore

2009-04-20 Thread Odhiambo ワシントン州
On Mon, Apr 20, 2009 at 1:31 PM, Daniels Vanags
wrote:

>
>
>   Unable to successfully dump | restore over ssh. Source machine
> FreeBSD 6.2, disk /dev/mirror/gm0s1a,
>
>  target machine FreeBSD 6.2, target disk /dev/ad1s1a mounted on /mnt.
>
>  Run dump -0aLf - / | ssh ip_address ''cd /mnt/ && cat | restore - rf
> -'',  dump/restore goes without any errors.


dump L0af - / | ssh ip_addr '(cd /mnt; restore -rf -)'


>  Fstab fixed, but system failure to boot: BTX halted.


You could either do bdslabel -B or use sysinstall to do the same. Only you
mount the slice to /, set bootable and softupdates, then chane the mount
point to /mnt before you "W" to commit.




-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"Clothes make the man.  Naked people have little or no influence on
society."
  -- Mark Twain
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump | Restore

2009-04-20 Thread Wojciech Puchar


target machine FreeBSD 6.2, target disk /dev/ad1s1a mounted on /mnt.

Run dump -0aLf - / | ssh ip_address ''cd /mnt/ && cat | restore - rf
-'',  dump/restore goes without any errors.


1 total nonsense:

cat|restore instead of restore

2 probably nonsense:
use rsh not ssh unless you really need encryption.



Fstab fixed, but system failure to boot: BTX halted.


bsdlabel -B
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Dump | Restore

2009-04-20 Thread Daniels Vanags
 

   Unable to successfully dump | restore over ssh. Source machine
FreeBSD 6.2, disk /dev/mirror/gm0s1a, 

 target machine FreeBSD 6.2, target disk /dev/ad1s1a mounted on /mnt.

 Run dump -0aLf - / | ssh ip_address ''cd /mnt/ && cat | restore - rf
-'',  dump/restore goes without any errors.

 Fstab fixed, but system failure to boot: BTX halted. 

 Please help.

 

 

 

 

 

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore

2009-04-09 Thread Jerry McAllister
On Thu, Apr 09, 2009 at 10:50:49AM +0300, Daniels Vanags wrote:

> Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
> empty, system fealure to boot. Please guide me, how to dump/restore
> devfs.
> 

  You only dump(8) file systems.   /dev /procfs /dev/mirror/..., etc
are not filesystems.   They are just directories.Don't dump them.
/procfs is not even a real directory so it goes away and gets repopulated
when the system boots again.

They all need to live in the '/' filesystem and of what is dumpable, gets
dumped when you dump / (the root filesystem).   

Unless I completely misunderstand what you are asking.

jerry


>  
> 
> > df -h
> 
> Filesystem SizeUsed   Avail Capacity  Mounted on
> 
> /dev/mirror/gm0s1a 52G 37G 11G78%/
> 
> devfs 1.0K1.0K  0B   100%/dev
> 
> procfs   4.0K4.0K  0B   100%/proc
> 
> linprocfs4.0K4.0K  0B   100%
> /usr/compat/linux/proc
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Daniel Vanags
> 
> Information Technology  Department
> 
> IT infrastructure system engineer
> 
> 
> 
> JSC SMP Bank  www.smpbank.lv
> 
> Phone:+371 67019386
> 
> E-mail:   daniels.van...@smpbank.lv
> <mailto:daniels.van...@smpbank.lv> 
> 
>  
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore

2009-04-09 Thread Wojciech Puchar

Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
empty, system fealure to boot. Please guide me, how to dump/restore


it always should be - before mounted as pseudo-fs




devfs.




df -h


Filesystem SizeUsed   Avail Capacity  Mounted on

/dev/mirror/gm0s1a 52G 37G 11G78%/

devfs 1.0K1.0K  0B   100%/dev

procfs   4.0K4.0K  0B   100%/proc

linprocfs4.0K4.0K  0B   100%
/usr/compat/linux/proc











Daniel Vanags

Information Technology  Department

IT infrastructure system engineer



JSC SMP Bank  www.smpbank.lv

Phone:+371 67019386

E-mail:   daniels.van...@smpbank.lv
<mailto:daniels.van...@smpbank.lv>



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore

2009-04-09 Thread Chris Rees
2009/4/9 Daniels Vanags :
> This is a source comp output, after dump/restore /dev is empty. I run 
> freesbie on target machine.
>
> -Original Message-
> From: Chris Rees [mailto:utis...@googlemail.com]
> Sent: Thursday, April 09, 2009 11:56 AM
> To: Daniels Vanags
> Subject: Re: Dump/Restore
>
> 2009/4/9 Daniels Vanags :
>> Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
>> empty, system fealure to boot. Please guide me, how to dump/restore
>> devfs.
>>
>>
>>
>>> df -h
>>
>> Filesystem                     Size    Used   Avail Capacity  Mounted on
>>
>> /dev/mirror/gm0s1a         52G     37G     11G    78%    /
>>
>> devfs                             1.0K    1.0K      0B   100%    /dev
>>
>> procfs                           4.0K    4.0K      0B   100%    /proc
>>
>> linprocfs                        4.0K    4.0K      0B   100%
>> /usr/compat/linux/proc
>>
>
> But /proc, /dev, and /u/c/l/proc are full in that df output...
> What are you talking about? Try ls /dev, and post that. Pretty sure it
> should be normal.
>
>
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>

You need to check then, that /dev is mounted.

# mount -t devfs devfs /dev

Chris

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore

2009-04-09 Thread Chris Rees
2009/4/9 Daniels Vanags :
> Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
> empty, system fealure to boot. Please guide me, how to dump/restore
> devfs.
>
>
>
>> df -h
>
> Filesystem                     Size    Used   Avail Capacity  Mounted on
>
> /dev/mirror/gm0s1a         52G     37G     11G    78%    /
>
> devfs                             1.0K    1.0K      0B   100%    /dev
>
> procfs                           4.0K    4.0K      0B   100%    /proc
>
> linprocfs                        4.0K    4.0K      0B   100%
> /usr/compat/linux/proc
>

But /proc, /dev, and /u/c/l/proc are full in that df output...
What are you talking about? Try ls /dev, and post that. Pretty sure it
should be normal.



--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore

2009-04-09 Thread Jonathan Chen
On Thu, Apr 09, 2009 at 10:50:49AM +0300, Daniels Vanags wrote:
> Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
> empty, system fealure to boot. Please guide me, how to dump/restore
> devfs.

These are pseudo file systems, and are dynamically managed by the
system. You aren't expected to back them up.

If you're system failed to boot, how did you inspect the filesystem?
-- 
Jonathan Chen 
--
   Do not take life too seriously.
   You will never get out of it alive.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dump/Restore

2009-04-09 Thread Olivier Nicole
> Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
> empty, system fealure to boot. Please guide me, how to dump/restore
> devfs.

I am not sure about /usr/compat/linux/proc but /dev and /proc are
created on the fly by the system:

Lines are added into /dev for each new device that the system detects
Lines are added into /proc for any new process started by the system

There is not reason to dump or restore them.

Bests.

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Dump/Restore

2009-04-09 Thread Daniels Vanags
Please Help! After dump-restore /dev, /proc, /usr/compat/linux/proc - is
empty, system fealure to boot. Please guide me, how to dump/restore
devfs.

 

> df -h

Filesystem SizeUsed   Avail Capacity  Mounted on

/dev/mirror/gm0s1a 52G 37G 11G78%/

devfs 1.0K1.0K  0B   100%/dev

procfs   4.0K4.0K  0B   100%/proc

linprocfs4.0K4.0K  0B   100%
/usr/compat/linux/proc

 

 

 

 

 

Daniel Vanags

Information Technology  Department

IT infrastructure system engineer



JSC SMP Bank  www.smpbank.lv

Phone:+371 67019386

E-mail:   daniels.van...@smpbank.lv
<mailto:daniels.van...@smpbank.lv> 

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dump/restore problem

2009-02-04 Thread A. Wright


Ivan;


when I started a migration to new HDD, according few how-tos, I got the
following warning:

# dump -0Lauf - /dev/ad0s1f | restore -rf -


When debugging dump/restore problems, it is always best to dump
to a file, and then restore from the file -- this allows you to
see which of dump and restore is printing which message.

I would guess that the "Header with wrong dumpdate" is this issue:
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/118087


More surprising is:


warning: ./.snap: File exists
*expected next file 141455, got 146*
 DUMP: 2.86% done, finished in 3:35 at Thu Feb  5 01:44:32 2009


What exactly is your .snap entry?  Is it actually a directory,
or do you have a file called .snap that is getting in the way?

The "expected next file" message indicates inode numbers out of
sequence, which I would guess also come from restore -- if the
warning about .snap comes from dump, then I would encourage you
to make sure that dump cleanly creates its archive (to a file)
before spelunking in the restore error messages.

If you are short of space and are using several partitions on
your new drive, just format the largest and place the output files
there while you experiement.

Andrew.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


dump/restore problem

2009-02-04 Thread Ivan Dimitrov
Hi list

when I started a migration to new HDD, according few how-tos, I got the
following warning:

# dump -0Lauf - /dev/ad0s1f | restore -rf -
  DUMP: Date of this level 0 dump: Wed Feb  4 22:02:42 2009
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping snapshot of /dev/ad0s1f (/usr) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 3021238 tape blocks.
*Header with wrong dumpdate.*
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
warning: ./.snap: File exists
*expected next file 141455, got 146*
  DUMP: 2.86% done, finished in 3:35 at Thu Feb  5 01:44:32 2009


So does anyone know what, exactly, "*expected next file 141455, got
146*" and "*Header with wrong dumpdate.*" means?

Thanks,
Ivan



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


  1   2   3   >