From owner-freebsd-questions@FreeBSD.ORG Mon Sep 1 12:49:33 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2627D106566B for ; Mon, 1 Sep 2008 12:49:33 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from smtp2-wak.yhgfl.net (smtp2-wak-ext.yhgfl.net [89.207.208.43]) by mx1.freebsd.org (Postfix) with ESMTP id B59D38FC15 for ; Mon, 1 Sep 2008 12:49:32 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from horbury.wakefield.sch.uk ([10.126.96.34]) by smtp2-wak.yhgfl.net (8.13.8/8.13.8/Debian-3) with ESMTP id m81CnMdR010152 for ; Mon, 1 Sep 2008 13:49:23 +0100 Received: from ITTEAM02 [10.126.96.253] by horbury.wakefield.sch.uk with ESMTP (SMTPD32-7.07) id A4B732200B6; Mon, 01 Sep 2008 13:48:55 +0100 From: "Marc Coyles" To: Date: Mon, 1 Sep 2008 13:48:51 +0100 Message-ID: <009601c90c31$15d9b5d0$fd607e0a@Horbury.Internal> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Importance: Normal X-YHGfL-MailScanner-Information: Please contact the YHGfL Foundation for more information X-YHGfL-MailScanner: Found to be clean X-YHGfL-MailScanner-MCPCheck: MCP-Clean, MCP-Checker (score=0, required 0.5) X-YHGfL-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-MailScanner-From: mcoyles@horbury.wakefield.sch.uk Subject: Live FS Dump errors... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mcoyles@horbury.wakefield.sch.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2008 12:49:33 -0000 Morning folks... I'm trying to use a script to run a dump of all filesystems, but whenever I use the -L option, I receive an error as follows for every mount: DUMP: Date of this level 0 dump: Mon Sep 1 13:37:57 2008 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping snapshot of /dev/da0s1a (/) to standard output DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 329257 tape blocks. DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: DUMP: 329274 tape blocks DUMP: finished in 91 seconds, throughput 3618 KBytes/sec DUMP: level 0 dump on Mon Sep 1 13:37:57 2008 DUMP: DUMP IS DONE mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error dump: Cannot create /home/.snap/dump_snapshot: No such file or directory DUMP: Date of this level 0 dump: Mon Sep 1 13:39:33 2008 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping snapshot of /dev/da0s1e (/usr) to standard output DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 4758000 tape blocks. DUMP: dumping (Pass III) [directories] mksnap_ffs: Cannot create /home/.snap/dump_snapshot: Input/output error dump: Cannot create /home/.snap/dump_snapshot: No such file or directory I've inspected the locations reported, and can confirm that .snap/dump_snapshot exists in the required locations on every mount, and shows as being created at the time the dump was run as follows: bigsis# pwd /home/.snap bigsis# ls -ltra total 4 drwx--x--x 11 root wheel 512 Mar 25 03:05 .. -r-------- 1 root operator 0 Sep 1 13:32 fsck_snapshot -r-------- 1 root operator 0 Sep 1 13:39 dump_snapshot drwxrwx--- 2 root operator 512 Sep 1 13:39 . The script I'm using is a perl script as follows, and is called by root's crontab: #!/usr/bin/perl use strict; use warnings; use Getopt::Std; use POSIX qw(strftime); use vars qw($VERSION); $Getopt::Std::STANDARD_HELP_VERSION =3D 1; $VERSION =3D '1.2'; my @FS =3D ('/', '/home', '/usr', '/var'); my $day =3D lc(strftime "%A", localtime); my $hostname =3D `/bin/hostname -s`; my %opt =3D ('F' =3D> 0, 'd' =3D> 0, 'h' =3D> 0); my $type; chomp $hostname; getopts("Fdh",\%opt); if ( $opt{h} =3D=3D 1 ) { print STDERR << "EOF"; usage: $0 [-hqd] -h : this (help) message -d : Dry run, only print what I am going to do -F : Force full backup {type 0} example: $0 -h -q -d EOF exit(0) } if ( $opt{F} =3D=3D 1 ) { $type =3D "0" } else { if ($day eq "sunday") { $type =3D "0" } else { $type =3D "0" } } foreach (@FS) { my $name =3D $_; if ($name eq '/') { $name =3D '/root'; }; $name =3D~ s/^\///g; # Unncomment for /backup/$day/$name.dump.gz my $command =3D '/sbin/dump -' . $type . ' -aLuf - ' . $_ . ' = | gzip -q > /backup/' . $day . '/' . $name . '.dump.gz'; # Put a "#" in front of the next line if you uncomment the last line # my $command =3D '/sbin/dump -' . $type . ' -aLuf - ' . $_ . ' = | gzip -q > /backup/' . $hostname . '/' . $day . '.' . $name . '.dump.gz'; if ($opt{d}) { print($command . "\n"); } else { system($command); }; }; exit(0); Any suggestions??? All works fine if I don't use -L, but this isn't exactly ideal for a backup of a live file-system... Marc A Coyles - Horbury School ICT Support Team Mbl: 07850 518106 Land: 01924 282740 ext 730 Helpdesk: 01924 282740 ext 2000 =20