1833043 Members
2527 Online
110049 Solutions
New Discussion

Re: raw partition backup

 
SOLVED
Go to solution
sysadm_1
Valued Contributor

raw partition backup

Hi Guys,
Our environment is hp-ux 10.2 with sybase 11.x
Sybase using raw disk partitioning.

my questions are
1.Apart from dd command,what other commands can be used to take backup of sybase raw partition.
2.Is there any way to take backup of sybase using OS commands without shutting down sybase.

Thanks in advance
8 REPLIES 8
Hoang Chi Cong_1
Honored Contributor
Solution

Re: raw partition backup

Hi man

1.You can use fbackup command.
2. No way to backup database with OS command withow shutdown database.
I recommend you should use the backup software for example: Data Protector or Veritas backup software.
These software support backup raw device/partion and online backup.(Of course, you have to by the lisence).

regard,
HoangChiCong
Looking for a special chance.......
sysadm_1
Valued Contributor

Re: raw partition backup

Hi HoangChiCong,
Can you please give the fbackup syntax.
Paul_481
Respected Contributor

Re: raw partition backup

Hi,

Here's the syntax for backup.

e.g.
your tape drive device file = /dev/rmt/0m
filesystem you want to backup = /home

#fbackup -v -f /dev/rmt/0m -i /home

the command above will backup your home directory. you can add as many -i as you want to include int the backup.

Hope that helps.

Regards,
Paul
Tony Scully_2
Valued Contributor

Re: raw partition backup

I'm certain that fbackup cannot be used if you do not have a filesystem.

Most database vendors who support raw devices have a backup utility that you should use - I don't know sybase I'm afraid, Informix for example has onbar and ontape.

You could use dd -- but this is not specifically built for backup/restore, and does not have the error checking that a true backup tool has. Also you will have to have a dd command for each device, like this:

dd if=/dev/vg01/rlvol1 of=/dev/rmt/0mnb bs=512k

if you use no rewind you can then append the next volume to the tape.

The other option is a backup software product like Data Protector or Veritas NetBackup.

Cheers,

Tony.
You CAN do that on HP
harry d brown jr
Honored Contributor

Re: raw partition backup

If your raw partitions are LV's then you could mirror the LV and once its sync'd, you potentially put sybase in some kind of hot backup mode (I know every little about sybase, other than driving past their building twelve years ago), then break the mirror, put the databsae back on-linr (out of hot backup) and backup the mirror, then resync the mirror for next backup window.

you will need a license from HP for hpux mirroring & and I would also purchase online JFS.

live free or die
harry d brown jr
Live Free or Die
Tony Scully_2
Valued Contributor

Re: raw partition backup

Just done a quick google, looks like Sybase has a 'dump' facility that can be used for database backup/restore, might be worth investigation:

http://sybooks.sybase.com/onlinebooks/group-as/asg1251e/commands/@Generic__BookView/26732;td=50#X

Tony
You CAN do that on HP
Dan Matlock_1
Regular Advisor

Re: raw partition backup

We use sybase as well and other than dd or other 3rd party software w/plugins there isn't a good way. As others stated, sybase has a 'dump' command to run from within sybase. We use these commands inside scripts and dump to tape directly or to a filesystem, which then fbackup or any other filesystem backup utility would do the rest. For the master DB dump, just simply make a script that includes:
----------------------------
isql -Usa -P <dump database master to '/tmp/master.dmp'
go
exit
EOF
----------------------------
If it is a BIG database or no space, here is a example to dump to tape:
----------------------------
isql -Usa -P <dump database BIG_DB to '/dev/rmt/0mn' with init , capacity=80000000
go
quit
EOF1
----------------------------
Hope this helps....>
Bill Hassell
Honored Contributor

Re: raw partition backup

Just to clarify: fbackup means: "File BACKUP" so it is useless for raw partitions. Choosing the type of database (filesystem vs. raw) is almost always made without input from the sysadmins. dd is just fine as long as you are not concerned about the complexities (read: probable failures due to errors, restoring to the wrong lvol, no recorded date/time info, etc).

Note that a database dump can be quite lengthy, requiring a *lot* of tape and time. Most databases will not handle a backup made while records are actively changed so when you restore such a backup, there will be numerous corrupt records, broken chains, invalid indexes, etc.

You probably paid a *lot* for the Sybase licenses so don't look for something free like dd or dump to backup your valuable data. Get a commercial tool such as HP's Data Protector which provides support for raw partition backups and hooks to support the database in backup mode. (make sure your DBAs understand how to put the database in backup mode and have made provisions for this in the user interface)


Bill Hassell, sysadmin