Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie Sybase backup problem

324 views
Skip to first unread message

Todd Hobdey

unread,
May 11, 2004, 6:35:01 PM5/11/04
to
I've been charged with backing up an ASE 11.9.2 database running on Redhat
AS 2.4.9-e.24, but I know almost nothing about either Sybase or Linux. The
box in question has a DAT tape drive on it.

I've managed to get the Backup Server process running (why it wasn't I don't
know). I then tried adding a disk backup device with

sp_addumpdevice "disk", diskbackup, "/opt/sybase-11.9.2/backup"

This command appears to have worked ("sp_helpdevice diskbackup" shows it),
but when I issue

dump database master to "diskbackup"

I get this:

Server Message: Number 401802, Severity 2
Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:
Backup Server: 4.18.2.1: Unsupported device type. The stat() system call
returned type '81F7D48' for ' ' . Refer to your operating system
documentation for more details.

sp_helpdevice also shows tapedump1 = /dev/st0 (40MB) and tapedump2 =
/dev/st1 (625MB), so I try

dump database master to "tapedump1"

and I get this:

Server Message: Number 405502, Severity 2
Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0
Backup Server: 4.55.2.1: Device validation error: couldn't open raw device
/dev/st0, error: Permission denied

All this is while connected to Sybase via isql as "sa". I'm ready to pull
out the few remaining hairs I have left. ANY HELP AT ALL WOULD BE
APPRECIATED!!! TIA.


Mark A. Parsons

unread,
May 11, 2004, 7:15:37 PM5/11/04
to
Todd Hobdey wrote:
>
> I've been charged with backing up an ASE 11.9.2 database running on Redhat
> AS 2.4.9-e.24, but I know almost nothing about either Sybase or Linux. The
> box in question has a DAT tape drive on it.
>
> I've managed to get the Backup Server process running (why it wasn't I don't
> know). I then tried adding a disk backup device with
>
> sp_addumpdevice "disk", diskbackup, "/opt/sybase-11.9.2/backup"
>
...snip...

>
> Server Message: Number 401802, Severity 2
> Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:
> Backup Server: 4.18.2.1: Unsupported device type. The stat() system call
> returned type '81F7D48' for ' ' . Refer to your operating system
> documentation for more details.

Is /opt/sybase-11.9.2/backup a file or directory? If it's a directory ...
that'll cause problems, ie, backupserver is expecting a file.

Assuming '..../backup' is a directory ... to dump to file you have a couple
options ...

1 - redefine diskbackup as '/opt/sybase-11.9.2/backup/your-dump-file-name'

Now try to dump to diskbackup. Just remember to move/cp the resultant dump
file before your next dump to diskbackup (it'll overwrite the previous
dump).

2 - dump directly to a dump file (don't have to create a dump device), eg:

dump database master to '/opt/sybase-11.9.2/backup/20040511.master.dbdump'

This should create a file called '20040511.161324.master.dbdump' out in the
/opt/sybase-11.9.2/backup directory. (Yeah, you can name it something else
if you want ... I just prefer to have a date/time stamp on my dump file
names.)


> sp_helpdevice also shows tapedump1 = /dev/st0 (40MB) and tapedump2 =
> /dev/st1 (625MB), so I try

...snip...


> Server Message: Number 405502, Severity 2
> Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0
> Backup Server: 4.55.2.1: Device validation error: couldn't open raw device
> /dev/st0, error: Permission denied

Does /dev/st0 (or /dev/st1) actually exist on your hardware? If not, get
rid of these dump devices. If the device(s) does exist ... make sure the
user who owns the backupserver process (eg, 'sybase' account) has
permissions to access the tape drive.

As for dumping directly to your DAT drive ... you'll need to know it's
device handle/address ... you should then be able to dump to said
handle/address. Check out your ASE doc's for information on using the
'dump database' command with tape drives.

--
Mark A. Parsons

Iron Horse, Inc.
iron_...@NOSPAM.compuserve.com

Todd Hobdey

unread,
May 12, 2004, 11:01:39 AM5/12/04
to
Okay, I tried giving it a fully qualified file name and got the following:

Server Message: Number 404101, Severity 1


Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 4.41.1.1: Creating new disk file
/opt/sybase-11.9.2/backup/master200405120739.dmp.
Server Message: Number 414102, Severity 2


Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 4.141.2.63: [0] The 'execve' call failed for device
'/opt/sybase-11.9.2/backup/master200405120739.dmp' with error number 13
[Permission denied]. Refer to your operating system documentation for
further details.
Server Message: Number 404302, Severity 2


Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 4.43.2.2: Couldn't create multibuffering subprocess.
Server Message: Number 7223, Severity 16
Line 1:
Cannot read from site 'SYB_BACKUP'

Before running the dump command, showserver showed the backupserver was
running under the sybase user (which is the owner of the
/opt/sybase-11.9.2/backup directory) with this command:

"/opt/sybase-11.9.2/bin/backupserver -SSYB_BACKUP -I/opt/sybase-11.9.2/inter
faces -e/opt/sybase-11.9.2/install/backup.log -M/opt/sybase-11.9.2"

After running it, the backupserver process is gone, so I can only assume the
multibuffering error kills it and which results in the "Cannot read..."
error.


"Mark A. Parsons" <iron_...@NOSPAM.compuserve.com> wrote in message
news:40A15E9A...@NOSPAM.compuserve.com...

Todd Hobdey

unread,
May 12, 2004, 5:04:37 PM5/12/04
to
Finally got it! There was an invalid -M command in the start file for
backupserver that was hosing the multibuffering thing. I was able to
successfully write master to a disk file after removing it. HOWEVER... my
goal is of course to write to my DDS3 tape drive. After inserting whatever
tape I could dig up, I used mt to erase it. mt properly recognizes the tape
type. Then when I execute

dump database master to "tapedump2" ("tapedump2" being defined as /dev/nst0
at 24GB)

I get the following:
Server Message: Number 605801, Severity 1

Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 6.58.1.1: Device '/dev/nst0' supports multiple dump files per
volume set.

Server Message: Number 605201, Severity 1

Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 6.52.1.1: OPERATOR: Volume to be overwritten on '/dev/nst0'
has unrecognized label data.

Server Message: Number 607801, Severity 1

Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 6.78.1.1: EXECUTE sp_volchanged @session_id = 60, @devname =
'/dev/nst0', @action = { 'PROCEED' | 'RETRY' | 'ABORT' }, @vname =
<new_volume_name>

If I issue

sp_volchanged, @session_id=60, @devname='dev/nst0', @action='proceed',
@vname='000001'

I get:
Server Message: Number 605301, Severity 1

Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 6.53.1.1: OPERATOR: Volume on device '/dev/nst0' cannot be
opened for write access. Mount another volume.

Server Message: Number 607801, Severity 1

Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:

Backup Server: 6.78.1.1: EXECUTE sp_volchanged @session_id = 60, @devname =
'/dev/nst0', @action = { 'PROCEED' | 'RETRY' | 'ABORT' }

So I abort and get:

Do I need to prepare the tape somehow (like Atoz The Librarian does in that
one episode of Star Trek)? I don't have an Atavacron, and like I said I
really don't know much about Linux. Oh, and the tape isn't write protected.


Mark A. Parsons

unread,
May 12, 2004, 5:07:04 PM5/12/04
to
Todd Hobdey wrote:
> Server Message: Number 404101, Severity 1
> Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:
> Backup Server: 4.41.1.1: Creating new disk file
> /opt/sybase-11.9.2/backup/master200405120739.dmp.
> Server Message: Number 414102, Severity 2
> Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:
> Backup Server: 4.141.2.63: [0] The 'execve' call failed for device
> '/opt/sybase-11.9.2/backup/master200405120739.dmp' with error number 13
> [Permission denied]. Refer to your operating system documentation for
> further details.

Still sounds like a permissions problem ... if not ownership ... then what
about ability to write to said directory?

> Server Message: Number 404302, Severity 2
> Server 'SYB_BACKUP', Procedure 'bs_write_header', Line 0:
> Backup Server: 4.43.2.2: Couldn't create multibuffering subprocess.

see notes below ...

> "/opt/sybase-11.9.2/bin/backupserver -SSYB_BACKUP -I/opt/sybase-11.9.2/inter
> faces -e/opt/sybase-11.9.2/install/backup.log -M/opt/sybase-11.9.2"

The -M option is looking for the full path to the sybmultbuf
binary/executable ... not just the directory (as you've specified here) ...
it should be something like '-M/opt/sybase-11.9.2/bin/sybmultbuf'.

Failure to locate the sybmultbuf binary could ... uhhh ... cause a few
problems? ;-)

Why did backupserver start in the first place? ... *shrug* ... perhaps it
doesn't 'check' the reference to sybmultbuf until it actually needs it, eg,
when performing a dump?

> After running it, the backupserver process is gone, so I can only assume the
> multibuffering error kills it and which results in the "Cannot read..."
> error.

See if you can get past the sybmultbuf issue ... perhaps this'll get you
past the permissions problem, ie, the permissions error may be bogus in
light of the sybmultbuf issues, eh?

Mark A. Parsons

unread,
May 12, 2004, 5:14:57 PM5/12/04
to
Todd Hobdey wrote:
> Finally got it! There was an invalid -M command in the start file

Yep ... you beat my post by about 3 minutes!!!! ;-)

> dump database master to "tapedump2" ("tapedump2" being defined as /dev/nst0
> at 24GB)

...snip...

> Do I need to prepare the tape somehow (like Atoz The Librarian does in that
> one episode of Star Trek)? I don't have an Atavacron, and like I said I
> really don't know much about Linux. Oh, and the tape isn't write protected.

Check out the tape options to the 'dump database' command ... in particular
...

dump database master to tapedump2 with init

This should force BS to overwrite whatever's currently on the tape and
'initialize' it as a Sybase dump tape.

There are other options for determining whether to rewind (or append) a
tape, unload the tape, setting the storage capabilities of the tape
(drive), setting a retention period for a tape, etc. Check out the options
for the 'dump database|transaction' commands for more details.

0 new messages