Re: [flexbackup-help] Pb recover from /dev/st0 - tar+gzip

2005-12-07 Thread Philippe AMIOT

Thanks David, I will try ...
CU
Philippe

David Scott Coburn a écrit :


On Tuesday 06 December 2005 05:46, Philippe AMIOT wrote:
 


Hello

I have a crash disk, I LOST ALL MY DATA

and I try to recover it, bur I have some problèmes, maybe you could help 
me please !


I want only recover /var/spool/mail !
   



Philippe,

I am not sure this will help, but when I want to do a restore this is
what I do:

(My backups are stored on disk, not tapes, so you will have to modify this
somewhat...)

root cd /backups/x22c/images
root flexbackup -c ../flexbackup.conf -list home.2.20021126.afio-gz | 
/backups/restore/listdir.pl scott  fred

The flexbackup.conf file is stored in the directory above the directory where
my images are.  The 'listdir.pl' perl script is just a simple script to find
all of the files in the -list output which are in a particular subdirectory.  I
use it so that I don't have to do so much hand editing of the -list output.
This is the perl script:

#!/usr/bin/perl

# extract list of files in a given subdirectory in the 'flexbackup -list'
# stream on sdtin.
#
# flexbackup -list afio-archive-name | listdir.pl subdirname  files
#

use strict;

my $dir;

$dir = shift @ARGV;  # get subdirectory name from command line

while () {
   chomp;
   if (/.*[\s]($dir\/.*)/) {
   print $1\n;
   }
}

Once you have the file 'fred' with the list of files in the subdirectory
you can further edit it to leave only the particular files you want (or
not, so you can extract all of the files in the subdirectory).

Then I do this:

root flexbackup -c ../flexbackup.conf -extract home.2.20021126.afio-gz -flist 
fred

This has always worked for me.

Cheers,

Scott

 





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37alloc_id865op=click
___
flexbackup-help mailing list
flexbackup-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexbackup-help


[flexbackup-help] Pb recover from /dev/st0 - tar+gzip

2005-12-06 Thread Philippe AMIOT

Hello

I have a crash disk, I LOST ALL MY DATA

and I try to recover it, bur I have some problèmes, maybe you could help 
me please !


I want only recover /var/spool/mail !

I'm in /tmp to recover ...
When I try
tar xzf /dev/st0 /var/spool/mail/
it said to me doesn't find in archive (french translation)

When I try
mt -f /dev/st0 rewind
mt -f /dev/st0 fsf 0
flexbackup --extract
It's extract only the backuped /etc ! Why ?

If I want only recover the file 14 (/var/spool/mail see list under), can 
I do :


mt -f /dev/st0 rewind
mt -f /dev/st0 fsf 14
flexbackup --extract

Is it correct ?

How do I only recover my var/spool/mail ...

Thanks a lot in advance for your Help

Philippe


Flexbackup Version :
# $Id: flexbackup.conf,v 1.74 2003/09/21 22:59:58 edwinh Exp $
# $Name: v1_2_1 $

I have flexbackup configured like this :

$type = 'tar';
$set{'backup'} = /home/valerie /home/valerie /home/fabien /home/didier 
/home/christophe/ /home/marilene /home/clarisse/ /home/david 
/home/william /home/guillemette /home/samba /home/egroupware 
/mnt/backup/diamant /mnt/backup/mysql /var/spool/mail /etc /var/www ;

$prune{'/'} = tmp proc;
$compress = 'gzip'; # one of false/gzip/bzip2/lzop/zip/compress/hardware
$compr_level = '9'; # compression level (1-9) (for gzip/bzip2/lzop/zip)
$buffer = 'buffer'; # one of false/buffer/mbuffer
$buffer_megs = '10';# buffer memory size (in megabytes)
$buffer_fill_pct = '75';# start writing when buffer this percent full
$buffer_pause_usec = '100'; # pause after write (tape devices only)
$device = '/dev/st0';
$blksize = '10';
$mt_blksize = 0;
$pad_blocks = 'true';
$remoteshell = 'ssh'; # command for remote shell (rsh/ssh/ssh2)
$remoteuser = ''; # if non-null, secondary username for remote shells
$label = 'true';  # somehow store identifying label in archive?
$verbose = 'true';# echo each file?
$sparse = 'true'; # handle sparse files?
$indexes = 'true';# false to turn off all table-of-contents support
$staticfiles = 'false';
$atime_preserve = 'false';
$traverse_fs = 'false';
$exclude_expr[0] = '.*/[Cc]ache/.*';
$exclude_expr[1] = '.*~$';
$erase_tape_set_level_zero = 'true';
### by default $erase_rewind_only = 'FALSE';
$erase_rewind_only = 'true';
$logdir = '/var/log/flexbackup';   # directory for log files
$comp_log = 'FALSE';# By default GZIP - compress log? 
false/gzip/bzip2/lzop/compress/zip
$staticlogs = 'true'; # By default FALSE static log 
filenames w/ no date stamp

$prefix = '';  # log files will start with this prefix
$tmpdir = '/tmp';  # used for temporary refdate files, etc
$stampdir = '/var/lib/flexbackup'; # directory for backup timestamps
$index = '/var/lib/flexbackup/index'; # DB filename for tape indexes
$keyfile = '00-index-key'; # filename for keyfile if archiving 
to dir

$sprefix = ''; # stamp files will start with this prefix
...
$tar_echo_record_num = 'false';
...

--
And my backup seem to be ok :

|-
| Doing level 0 backup of set all using tar

| All sets = backup (1 tapes)
| Retensioning tape...
| Rewinding  erasing tape...
| Creating index key 200512022116
| Backup set backup (/home/valerie /home/fabien /home/didier 
/home/christophe/ /home/marilene /home/clarisse/ /home/david 
/home/william /home/guillemette /home/samba /home/egroupware 
/mnt/backup/diamant /mnt/backup/mysql /var/spool/mail /etc /var/www)

| Tape #0
|
At block 0.
|
| File number 1, tape index 200512022116
|-
| File number 1, tape index 200512022116
| Backup of: /home/valerie
| Date of this level 0 backup: Fri Dec 02 21:17:11 2005
| Date of last level 0 backup: the epoch
|
| cd /home/valerie  find . -depth -xdev ! -type s ! -regex \
|   .*/[Cc]ache/.* ! -regex .*~$ -print0 | tar --create --null \
|   --files-from=- --ignore-failed-read --same-permissions --no-recursion \
|   --totals --label level 0 /home/valerie Fri Dec 02 21:17:11 2005 \
|   tar+gzip from opale --sparse -b 20 --file - | gzip -9 | buffer -m 10m \
|   -p 75 -s 10k -t -u 100 -B -o /dev/st0
|
Total bytes written: 5427200 (5,2MiB, 4,1MiB/s)
Kilobytes Out 2680
|
| Backup start: Fri Dec 02 21:17:11 2005
| Backup end:   Fri Dec 02 21:17:32 2005
|
At block 0.

[...]

| Rewinding...

File  Contents(tape index 200512022116)
--
0tape index key
1level 0 /home/valerie Fri Dec 02 21:17:11 2005 tar+gzip from server
2level 0 /home/fabien Fri Dec 02 21:17:42 2005 tar+gzip from server
3level 0 /home/didier Fri Dec 02