Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-26-2010, 07:38 AM   #1
LQ Newbie
Registered: Apr 2010
Posts: 1

Rep: Reputation: 0
Smile How to change to single user mode in a dump script


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
Old 04-26-2010, 02:14 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
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



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
single user mode under vxfs mode enabled. UltraSoul Solaris / OpenSolaris 1 06-27-2009 10:48 PM
single user mode? sdcc619 Fedora 4 03-27-2009 09:02 PM
how do i get into single user mode please wrighty2008 Linux - Newbie 5 01-06-2009 10:58 AM
cannot change font size in single user mode (not konsole, not xterm) just bare consol Emmanuel_uk Linux - Newbie 2 09-04-2008 04:01 PM
single user mode aashishdhabarde Linux - Kernel 1 01-31-2008 06:11 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration