View Single Post
  #8   (View Single Post)  
Old 25th February 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

You could try to use dump(8) to create a backup of the drive. Just make sure you have enough space:

Code:
# dump -0af /home/j65nko/usb-dump /dev/da0s1
Explanation:
  • -0
    do a level 0 dump
  • -a
    Means 'auto-size'. Although meant for tape-drive you also need this when you backup to file, as I did here.
  • -f /home/j65nko/usb-dump
    Specifies the file to write the 'dump' to
  • /dev/da0s1
    The USB drive, which does not need to be mounted at all

I plugged an external USB disk, which has been formatted with OpenBSD UFS. (No problem to mount it in FreeBSD with the command I showed you in my first post)

First a check to see how much space in my home directory (in /usr)
Code:
 df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad6s1a    989M    172M    738M    19%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad6s1e    989M     16K    910M     0%    /tmp
/dev/ad6s1f     30G    1.1G     27G     4%    /usr
/dev/ad6s1d    4.8G     11M    4.4G     0%    /var
I hope 27G is enough....
The dump itself:
Code:
hercules# dump -0af /home/j65nko/usb-dump /dev/da0s1

  DUMP: Date of this level 0 dump: Fri Feb 25 03:09:37 2011
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/da0s1 to /home/j65nko/usb-dump
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 28017516 tape blocks.
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: 9.59% done, finished in 0:47 at Fri Feb 25 04:03:06 2011
  DUMP: 19.16% done, finished in 0:42 at Fri Feb 25 04:03:09 2011
  DUMP: 28.73% done, finished in 0:37 at Fri Feb 25 04:03:10 2011
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote