Copying Oracle data files
Jason Haar
Jason.Haar at trimble.co.nz
Wed Nov 10 10:25:49 GMT 2004
Tauya Mhangami wrote:
>Can I copy an Oracle database by just copying that Oracle Database
> datafiles and moving them to another server with oracle? If
>possible can one back up a database using this same method.
>
>
>
Why don't you try it and see?
I don't think it'll work reliably. As you are running Oracle, I will
assume that is because it is a busy system, that means it does the whole
thang with transaction logs as well as the database files. That means at
any one point in time, the database files don't contain an up-to-date
and consistent image of the actual database (as some records are sitting
in transaction logs waiting to sync with the database). That means rsync
cannot "just copy" the files about and expect to be usable.
However, if the database is "quiet", and the databases are flushed so
that the transaction logs are cleaned (making snapshots of databases has
the same effect), then yes, you can copy them about.
With MySQL servers, I just do plain old "mysqldump" and rsync the output
file. Guaranteed consistent :-)
Jason
More information about the rsync
mailing list