backup to file

whwar9739

Member
Is it possible to backup a running database to a file in another directory? If so what would the command look like? Thanks.
 

Casper

ProgressTalk.com Moderator
Staff member
probkup online /path/to/database/databasename /other/directory/backupname


Casper.
 

whwar9739

Member
Thanks Casper,

On other quick question then; the backup will then be a single file that I can use prorest on to restore it. What would I need in the directory that I want to restore it in? Would I be able to restore it in an empty directory?
 

TomBascom

Curmudgeon
prorest dbname backupfilename

will restore the db.

If you would like to change the physical structure of the db (resize or re-locate extents) then create a dbname.st file in the directory that you are restoring into. The prorest command will use that instead of the structure in the backup.

You can also pre-create the desired structure by using "prostrct create" with the .st file ahead of time. This will save some time when restoring as the space will already be allocated from the OS. Depending on what you're doing this can be a handy shortcut.
 

whwar9739

Member
Thanks Tom,

One more question, If I do an online backup and then restore the database is this new 'copy' of the database truncated from the original?

Thanks again to all.
 

whwar9739

Member
Thanks to all that have helped so far.

I have yet another question. This may not be the best forum for this but it is realated to this backup file. I am trying to compress a backup file that is approx. 6 gig using bzip2. I get the error that the input file does not exist. Has anyone here ever run into that, and if so is there a way to fix/work around this?
 

TomBascom

Curmudgeon
Thanks Tom,

One more question, If I do an online backup and then restore the database is this new 'copy' of the database truncated from the original?

Thanks again to all.

What do you mean by "truncated"?

It is a complete copy as of the point in time where you started the backup. Any transactions that were started but not comitted when the backup began will be backed out.
 

whwar9739

Member
What do you mean by "truncated"?

By truncated I mean will _proutil <dbname> -C truncate bi need to be run?

I know that if you just use something like a cp command from UNIX that the databases will still be connected to one another and anything that happens to one will be reflected in the other.

It is a complete copy as of the point in time where you started the backup.

I ran the following command probkup online <dbname> <output filename>


Hope that answers your questions Tom.
 

TomBascom

Curmudgeon
By truncated I mean will _proutil <dbname> -C truncate bi need to be run?

No. That command should only be run when upgrading to a new version or if an unusual event causes your bi file to grow far beyond its usual size.

I know that if you just use something like a cp command from UNIX that the databases will still be connected to one another and anything that happens to one will be reflected in the other.

I'm not sure where you heard this but it is incorrect.

If you use an OS copy command the database will fail to start and give you an error to the effect that it is a copy of the original. You can fix that by creating an .st file that reflects the locations that you copied the database to and then running prostrct repair.
 

tamhas

ProgressTalk.com Sponsor
And if you do a cp of a running database, you will not end up with a useful backup.
 

whwar9739

Member
I think the thing is in my situation 90% of the time I am not dealing with a 'live' database rather a realativly empty database. However occasionally I need to get a copy of a 'live' database to do some testing of programs prior to impementing the program against the actual 'live' database. So we probably do a lot of things that normally wouldn't be done in a standard environment.

Thanks again for everyone's input it was greatly appreciated.
 

tamhas

ProgressTalk.com Sponsor
Recognize that with a live database, if you make a cp, you cannot capture the .db etc files at the same instant as the .bi, so you are guaranteed to have a corrupt copy. Use probkup -online to a file and restore from the file to have a meaningful copy.
 

whwar9739

Member
Exactly the reason that I was asking on here cause I knew that a cp command was really not the correct way to work with a live database. Typically the reason we can get away with a cp command is because we shutdown the database and are able to ensure that no one is changing the database.
 

momo

New Member
please can any one help me with this problem

8: Out of free shared memory. Use -Mxs to increase. (6495)
5: Lock table overflow, increase -L on server (915)
 

whwar9739

Member
please can any one help me with this problem

8: Out of free shared memory. Use -Mxs to increase. (6495)
5: Lock table overflow, increase -L on server (915)


You may want to try creating a new thread, it may not get read or answered inside an existing thread.
 
Top