How to change to single user mode in a dump script
Hello,
I have this dump script that performs either full or incremental backups depending on the day of the week. From what I have read, when using dump you should drop to single user mode to help prevent the backups from being inconsistent before you issue the dump command. What I want is the script to drop to single user mode, perform the backups using dump, and then go back to runlevel 3 after the backups complete. I know when you enter init 1 to drop to single user mode, but doing so within a script reboots the computer and drops it to single user mode and the rest of the script doesn't complete. What would be a good method for me to be able to accomplish what I want to do? Do I need to run other scripts that would call mine? I am running Centos 5.4 Any help would be greatly appreciated. Thank you |
Hi, welcome to LQ!
You could have a script kick off at runlevel 1 that checks for a flag which you generate on runlevel 3 when you're about to run a dump. A "flag" in this context being a file e.g. under /var/state Cheers, Tink |
All times are GMT -5. The time now is 06:32 PM. |