#3453 Issue closed
: Tape Drive IBM TS2290: Boot from USB flash, restoring from tape¶
Labels: support / question
, fixed / solved / done
,
special hardware or VM
DebianGuru opened issue at 2025-04-10 18:31:¶
Requesting support or just a question¶
Can I boot from a USB flash, then get the restore from tape?
Platform¶
Linux x64
Description¶
I think I was able to backup to tape with OBDR,
but I can't figure out how/if I can boot my server from it.
Taped Drive is IBM TS2290 and Server is Lenovo SR650V3.
Can't find out anything from IBM or Lenovo's website.
Writing iso to CD and burning is a pain
and the servers don't have an internal optical drive,
so I thought I'd boot from USB flash,
then let it restore from the Tape.
The USB drive boots into command line,
I log in as root and run the rescue.
I get
ERROR: No 'backup.tar.gz' detected in /var/tmp/rear.blahblahblah/outputfs/rear/servername/*
ls verifies there is nothing under /var/tmp.
Seems like it's looking for the backup data on the local filesystem?
Here's local.conf contents:
OUTPUT=USB
TAPE_DEVICE=/dev/nst0
BACKUP_URL=tape:///dev/nst0
BACKUP=NETFS
What am I missing?
I've used this before with a network SMB share
and I was impressed, but this has got me so frustrated.
Been working with rear for 3 days with various issues
and have yet to make one successful backup/restore.
Any help is greatly appreciated.
Related issues:¶
https://github.com/rear/rear/issues/3448
https://github.com/rear/rear/issues/3451
gdha commented at 2025-04-11 07:02:¶
@DebianGuru Could you share the output of lsscsi
and lsmod
so we can
see the modules involved around the tape drive.
According the data sheet of IBM TS2290 we cannot figure out if the drive
is OBDR capable. Perhaps, IBM support can assist you on that point?
Perhaps you need a special software driver or configuration setup on the
drive itself?
Does your system uses UEFI to boot?
If yes then you first need to format your USB drive as following:
rear -v -- --efi /dev/sdb
(assuming /dev/sdb is your USB drive - it
will reformat the whole USB disk!)
If not, use:
rear -v format /dev/sdb
Then edit the /etc/rear/local.conf
file and define:
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
OUTPUT_URL=usb:///dev/disk/by-label/REAR-000
# is the tape rewinded?
TAPE_DEVICE=/dev/nst0
BACKUP_URL=tape:///dev/nst0
BACKUP=NETFS
Hope this help?
jsmeix commented at 2025-04-11 07:12:¶
@DebianGuru
first and foremost:
Using ReaR with tape drives is not something I ever did.
I never used a tape device with Linux
so I cannot really help with tape device issues.
In general:
We at ReaR upstream did not get user issues since years
regarding using ReaR with tape drives and in particular
no further user contributions in this area.
The last one we got was via
https://github.com/rear/rear/issues/2637
and even that finally faded away in July 2023
https://github.com/rear/rear/issues/2637#issuecomment-1620667477
So all I can provide is some generic thoughts
what might help in your specific case:
I think the first thing to have in mind is that
in ReaR the "backup of the system files" part
is a separated and somewhat "external" part
of what ReaR's actual task is, see
"Relax-and-Recover versus backup and restore" in
https://en.opensuse.org/SDB:Disaster_Recovery#Relax-and-Recover_versus_backup_and_restore
For each backup method which is supported in ReaR there is
a matching usr/share/rear/restore/METHOD directory.
That there is no usr/share/rear/restore/TAPE directory
tells me that there is no generic TAPE backup method
which is supported in ReaR.
There is only usr/share/rear/restore/OBDR but this directory
is basically empty - in particular there is no ReaR script.
This tells me that the OBDR backup method is rather special
and not a generic backup method for tape devices.
Because I never used a tape device with Linux
I may not see things which are obvious
for users who actually use a tape device.
The primary functionality of ReaR is to make a bootable
ReaR recovery system which contains the ReaR installer
(i.e. what is run via "rear recover") which can recreate
the storage setup (called "disk layout" in ReaR)
same as it was before on the original system.
Afterwards as last step during "rear recover"
the "backup of the system files" is restored
into the recreated storage.
ReaR provides a very generic and rather crude backup method
BACKUP=REQUESTRESTORE
This is ReaR's default/fallback backup method
when no BACKUP is specified by the user.
The BACKUP method REQUESTRESTORE is not real backup method
but simply halts the recovery and requests that somebody
will restore the data into the recreated storage.
So when you have your "backup of the system files"
on a tape drive and use BACKUP=REQUESTRESTORE
together with OUTPUT=USB
then "rear mkbackup" is useless because
BACKUP=REQUESTRESTORE does not make a backup of the files
so only "rear mkrescue" is needed and that will make
a ReaR recovery system which is bootable from USB.
When you boot that ReaR recovery system on replacement
hardware and inside the running ReaR recovery system
you call "rear recover" you will get your storage setup
recreated same as it was before on the original system
and the recreated (empty) storage will be mounted
inside the running ReaR recovery system at /mnt/local
Then "rear recover" halts and requests you to restore
your "backup of the system files" from your tape drive
into /mnt/local
To do that everything what is needed for the backup restore
(e.g. kernel modules for the tape drive, programs to use the
tape drive, config files for the tape drive, whatever else)
must be included in the ReaR recovery system.
ReaR provides generic ways to get things included
in the ReaR recovery system.
Those are (see usr/share/rear/conf/default.conf)
MODULES
FIRMWARE_FILES
REQUIRED_PROGS
LIBS
COPY_AS_IS
So with BACKUP=REQUESTRESTORE
plus appropriate settings as needed for
MODULES FIRMWARE_FILES REQUIRED_PROGS LIBS COPY_AS_IS
you can set up ReaR to be able to manually restore
a backup from a tape drive during "rear recover".
Of course this requires manual try and error
step by step legwork until it will work.
jsmeix commented at 2025-04-11 12:17:¶
@DebianGuru
in addition and/or alternatively to BACKUP=REQUESTRESTORE
we also have BACKUP=EXTERNAL see its description in
usr/share/rear/conf/default.conf
In contrast to BACKUP=REQUESTRESTORE
BACKUP=EXTERNAL has ReaR scripts to make a backup via "rear mkbackup"
usr/share/rear/backup/EXTERNAL/default/500_make_backup_with_external.sh
and to restore it during "rear recover"
usr/share/rear/restore/EXTERNAL/default/500_restore_with_external.sh
so with BACKUP=EXTERNAL and appropriate settings for the
user config variables
EXTERNAL_...
MODULES
FIRMWARE_FILES
REQUIRED_PROGS
LIBS
COPY_AS_IS
I think it should be possible to set up ReaR so that
"rear mkbackup" and "rear recover" behave as usual
with making and restoring a backup on tape drive.
It is ages ago when I tried last BACKUP=REQUESTRESTORE
and BACKUP=EXTERNAL so I have no personal experience
how the current state of both is.
If special command are needed
e.g. to somehow prepare the tape drive
see
PRE_BACKUP_SCRIPT and POST_BACKUP_SCRIPT
(for "rear mkbackup")
and
PRE_RECOVERY_COMMANDS / PRE_RECOVERY_SCRIPT and
POST_RECOVERY_SCRIPT / POST_RECOVERY_COMMANDS
(for "rear recover")
in usr/share/rear/conf/default.conf
jsmeix commented at 2025-04-11 12:35:¶
@DebianGuru
FYI regarding your question in your initial description
Seems like it's looking for the backup data on the local filesystem?
What is at /var/tmp/rear.blahblahblah/outputfs/...
is normally not a local filesystem because
with BACKUP=NETFS this is normally a mountpoint directory
where "usually a network share" from a remote host
is locally mounted, see the BACKUP=NETFS description in
usr/share/rear/conf/default.conf
NETFS is an internal backup method that saves the backup
into a mounted directory.
This is usually a network share, but can also be used
to create a backup to a local disk (by providing your
own BACKUP_MOUNTCMD and BACKUP_UMOUNTCMD commands
that mount the local disk.
If you could mount your tape drive so that its contents
appear as regular files within a mountpoint directory
then it should be possible to somehow "misuse"
BACKUP=NETFS with BACKUP_MOUNTCMD and BACKUP_UMOUNTCMD
for storing and restoring a backup on a tape drive.
Again:
I know nothing about tape drives so I have no idea
whether or not mounting a tape drive makes any sense.
Mounting a tape drive would require that there is some
kind of filesystem on the tape drive so that its contents
could appear as regular files within a mountpoint directory.
I only try to explain some generic background information
that might help you to better understand how ReaR behaves
so you might be able to find a way how you could use ReaR
to store and restore a backup on your tape drive.
DebianGuru commented at 2025-04-15 12:47:¶
Solved. I was missing "USB_DEVICE=/dev/disk/by-label/REAR-000" as suggested by @gdha . Many thanks to all who provided replies.
[Export of Github issue for rear/rear.]