LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   tar - application/service shutdown (https://www.linuxquestions.org/questions/linux-server-73/tar-application-service-shutdown-4175448005/)

steinz 01-31-2013 10:18 AM

tar - application/service shutdown
 
Hi,

When running tar, is it necessary to shutdown any application or service that is running?

So, if I am running Oracle and want to backup the oracle home directory before I patch it. Should I shutdown oracle and then run tar? Another was to ask the same question is, does linux put a lock on an executable file if it is currently running?

Thanks
Randy

TB0ne 01-31-2013 10:36 AM

Quote:

Originally Posted by steinz (Post 4881436)
Hi,
When running tar, is it necessary to shutdown any application or service that is running?

So, if I am running Oracle and want to backup the oracle home directory before I patch it. Should I shutdown oracle and then run tar? Another was to ask the same question is, does linux put a lock on an executable file if it is currently running?

No, all tar does is copy what's there (unless you tell it differently), into an archive file. That said, it is not unlike ANY utility that copies a file, including purpose-built backup software (TSM, Netbackup, etc.). If a file is open AND CHANGING when you copy it, the copy is not to be trusted. Executing a file doesn't change it....but databases are always open and doing something. The best way to back it up is to either shut it down, or to use a dump utility to dump the DB contents to another file.

steinz 01-31-2013 10:45 AM

thanks,
I did not want to use tar to backup the database, just the software home.
I do not think any files in that are changing. I was concerned about an os lock on a file that was open, making it inaccessible to tar.


Randy

TB0ne 01-31-2013 11:08 AM

Quote:

Originally Posted by steinz (Post 4881455)
thanks,
I did not want to use tar to backup the database, just the software home.
I do not think any files in that are changing. I was concerned about an os lock on a file that was open, making it inaccessible to tar.
Randy

You shouldn't have problems, but as you probably are aware....your backups are only as good as your TESTING of them. Unless you verify your backups, you shouldn't 100% trust them.


All times are GMT -5. The time now is 09:36 PM.