Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: anivio on August 17, 2010, 05:47:36 PM
-
Hi!
Is it possible to restore a single file from a tape?.
If not, i would like to configure a backup with an external usb hard drive.
Is it possible to restore a single file from an external usb-drive?
Thank you.
-
hi
please read here (http://forums.contribs.org/index.php/topic,45315.msg219921.html#msg219921)
HTH
-
anivio
Is it possible to restore a single file from a tape?.
Please use the Search link at top of these forums.
You would have found this
http://forums.contribs.org/index.php/topic,45315.msg219921.html#msg219921
I would like to configure a backup with an external usb hard drive.
Is it possible to restore a single file from an external usb-drive?
Have you actually read the Manual ? Please do. Also take a look at the Server Manager Backup or Restore panel as the functionality to restore single files is included there.
-
Hi!
Thank you.
I am sorry.
I have searched the forum and the web, but have not found a solution.
It does not work. I get the following output:
[root@server01 ~]# mkdir /var/tmp/restore
[root@server01 ~]# cd /var/tmp/restore
[root@server01 restore]# mt -f /dev/nst0 rewind
[root@server01 restore]# mt -f /dev/nst0 fsf 1
[root@server01 restore]# flexbackup -restore
flexbackup version 1.2.1 (http://flexbackup.sourceforge.net)
/etc/flexbackup.conf syntax OK
$keyfile not found in config: default=00-index-key
$buffer_fill_pct not found in config: default=75
$buffer_pause_usec not found in config: default=100
|------------------------------------------------------------
| Checking 'buffer' on this machine... Ok
| Checking /bin/sh on this machine... bash1
|------------------------------------------------------------
| Logging output to "flexbackup.restore.201008172003.log"
| Reading from CURRENT TAPE POSITION
|------------------------------------------------------------
SCSI 2 tape drive:
File number=1, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (81010000):
EOF ONLINE IM_REP_EN
|------------------------------------------------------------
Interactive restore for tar not implemented at /usr/bin/flexbackup line 2211.
[root@server01 restore]# ls
flexbackup.restore.201008171940.log flexbackup.restore.201008171958.log help
flexbackup.restore.201008171945.log flexbackup.restore.201008172003.log
-
Interactive restore for tar not implemented at /usr/bin/flexbackup line 2211.
AFAICT it can only restore if the dump type backup is choosen, judging from the source:
2204 if ($cfg::type eq 'dump') {
2205 $cmd .= "$::path{restore} -i ";
2206 $cmd .= "$::dump_verb_flag ";
2207 $cmd .= "$::dump_blk_flag ";
2208 $cmd .= "-f -";
2209
2210 } else {
2211 die("Interactive restore for $cfg::type not implemented");
2212 }
Since I am not to familiar with flexbackup, but familiar with SME Server, this most likely means that the type of your backup is set to something else then dump, you can check what it is by executing this as root user:
db configuration getprop flexbackup Type
My guess is your backup is done using tar (which is the default for SME Server). I guess the man page will tell you how to extract a single file, but from a quick glance my guess it should be something like this:
1. List the contents of the tape:
flexbackup -list
2. Find the file(s) to recover and restore them:
flexbackup -extract -flist filename1 filename2
Have a look at the man pages for more information:
man flexbackup[code]
If that won't work it might be you need to restore the archive first and then use the tar command to extract the specific file.
-
OK. I can list all files.
Also i have tried to change the backup method to dump with the following commands:
/sbin/e-smith/config setprop flexbackup Type dump
/sbin/e-smith/expand-template /etc/flexbackup.conf
But i have changed back to tar.
Like i said above i can list files but if i try to restore all files from the list with the command
flexbackup -extract
i get the following output:
[root@server01 restore2]# cd /
[root@server01 /]# flexbackup -extract
flexbackup version 1.2.1 (http://flexbackup.sourceforge.net)
/etc/flexbackup.conf syntax OK
$keyfile not found in config: default=00-index-key
$buffer_fill_pct not found in config: default=75
$buffer_pause_usec not found in config: default=100
|------------------------------------------------------------
| Checking 'buffer' on this machine... Ok
| Checking /bin/sh on this machine... bash1
|------------------------------------------------------------
| Logging output to "flexbackup.extract.201008172201.log"
| Reading from CURRENT TAPE POSITION
|------------------------------------------------------------
SCSI 2 tape drive:
File number=2, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (9010000):
EOD ONLINE IM_REP_EN
|------------------------------------------------------------
| buffer -m 20m -p 75 -s 32k -t -u 100 -i "/dev/nst0" | gzip -dq | tar \
| --extract --totals --same-permissions --sparse -b 64 -B --file -
|------------------------------------------------------------
buffer (reader): failed to read input: Input/output error
gzip: stdin: unexpected end of file
|------------------------------------------------------------
SCSI 2 tape drive:
File number=2, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x47 (TR-5).
Soft error count since last status=0
General status bits on (9010000):
EOD ONLINE IM_REP_EN
I am happy to be a linux newbie. 8-)
What can i do?
-
Also i have tried to change the backup method to dump with the following commands:
/sbin/e-smith/config setprop flexbackup Type dump
/sbin/e-smith/expand-template /etc/flexbackup.conf
But i have changed back to tar.
That is the best thing to do, as backup needs to be in dump format as well to be restored from. Changing it to restore a backup made with tar will (most likely) not restore with the method to restore dumps.
|------------------------------------------------------------
| buffer -m 20m -p 75 -s 32k -t -u 100 -i "/dev/nst0" | gzip -dq | tar \
| --extract --totals --same-permissions --sparse -b 64 -B --file -
|------------------------------------------------------------
buffer (reader): failed to read input: Input/output error
gzip: stdin: unexpected end of file
|------------------------------------------------------------
I am no flexbackup expert, but it seems that something is going wrong while reading back the data from the tape. Does the mentioned logfile provide additional information?
-
It almost works now with tar mode.
One problem left: I am not able to delete the file in my user directory if i use tar mode. I have not found a way to set file permissions. If i use dump it works because i can set the file permission during restore.
My steps:
1) Rewind the tape
mt -f /dev/nst0 rewind
2) Move forward for list reading
mt -f /dev/nst0 fsf 1
3) List all files in archive
flexbackup -list
4) Steps 2 and 1 again
5) Restore single file with
flexbackup -extract -onefile <filename>
6) Rewind and eject the tape
mt -f /dev/nst0 rewoffl