Date: Mon, 1 Sep 2008 13:48:51 +0100 From: "Marc Coyles" <mcoyles@horbury.wakefield.sch.uk> To: <freebsd-questions@freebsd.org> Subject: Live FS Dump errors... Message-ID: <009601c90c31$15d9b5d0$fd607e0a@Horbury.Internal>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?009601c90c31$15d9b5d0$fd607e0a>