Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I have backed up the complete file-system on a machine's hard-drive, can I use restore it and expect Oracle database to be consistent? The backup software backed up all files on the hard-disk using VSS.

share|improve this question
    
Regardless of what anyone tells you here, or anywhere else, I would recommend you test this before relying on it. Perform a recovery on a backup at least once to satisfy yourself that it really works. –  DCookie Feb 10 '11 at 17:33

4 Answers 4

up vote 3 down vote accepted

The DB state will be the same as if you suddenly power off your server. So, Oracle will need to perform transaction log checking and to roll back all uncommited transactions. So, this state can be described as "eventually consistent" or "consistent after repair". This is probably not what you expect from a backup. The preferred way to do a backup is to use Oracle backup tools, they will provide 100% consistent backup.

Hmm, it looks like Oracle has a VSS Writer service (more details here). VSS Writer services are instructed by a backup tool to flush changes to the disk when a backup procedure is performed. So, VSS Writers help to get a consistent backups using VSS backup tool. You should only check you have Oracle VSS Writer service installed and enabled.

share|improve this answer

Was the database instance up and running at the time ?

If so, there's a good chance that the database is an inconsistent state (ie transactions in progress that would need to be rolled back). In that case, Alex's advice is correct. You would be able to do a recovery up to the point of the backup.

If the database was shutdown correctly then you would have a consistent copy. That would mean you could recover it and, if you have all the archived log files subsequent to the VSS backup, you would be able to roll the database forward to any point covered by those archvied log files.

If you use the Oracle RMAN backup facility you can take consistent backups without shutting down the database and, by retaining archive logs, you can recover to any point in time.

share|improve this answer

transactions in progress cannot be backed up by any tool, even oracle's. it would make no sense to backup up a fractional transaction, think about it. you want the db in a state that's 'good', that is all finished transactions until the backup starts. so with vss the backup is fine because the data is taken as a snapshot (the files can't change while being read)

share|improve this answer

I use NetApp snapshots to make instant backups of the database which I can then clone and bring up on another system in a matter of minutes. This is the procedure:

ALTER DATABASE BEGIN BACKUP;

Snapshot the data directory

ALTER DATABASE END BACKUP;
ALTER SYSTEM ARCHIVE LOG CURRENT;

Snapshot the archive log directory.

This makes sure the snapshot has the archive logs needed to bring the DB back up to date. I've used this a few hundred times on a very active DB without a recovery problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.