LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 01-05-2006, 08:54 AM   #1
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Rep: Reputation: 30
backup question


Where does a script to run a backup go whenever the computer is turned off?

dlw
 
Old 01-05-2006, 02:04 PM   #2
Padma
Member
 
Registered: Aug 2003
Location: Omaha, NE, USA
Distribution: PCLinuxOS 2007
Posts: 808

Rep: Reputation: 30


I assume it goes nowhere. AFter all, if the computer is off, the script can't run.
 
Old 01-05-2006, 05:36 PM   #3
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Original Poster
Rep: Reputation: 30
Yea, that question is confusing.
What I want is a backup to happen
during the shutdown process.

Where would this script go?

dlw
 
Old 01-06-2006, 05:17 PM   #4
rrsc16954
Member
 
Registered: Sep 2003
Location: Edinburgh, Scotland
Distribution: Kubuntu 12/4
Posts: 214

Rep: Reputation: 30
What are you backing up and where to?

I have lots of experience in a major computer hall (same machines that did the moonshots) of tedious circulation of backups on magnetic tapes - as well as in the domestic situation.

Normally you are copying data from your machine to removable storage for safe keeping.
 
Old 01-07-2006, 09:36 AM   #5
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Original Poster
Rep: Reputation: 30
Backing up is not the issue.
The issue is;
when I turn off my computer,
I want to do a backup as it shuts down.
Where would a backup script go to do this?

To do a daily backup at a certain time,
the script could go in /etc/cron.daily.

I want a backup as the computer shuts down.

dlw
 
Old 01-08-2006, 07:28 PM   #6
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
Create your script file, say /etc/rc.d/rc.local.stop, and create links to it in
the two directories /etc/rc.d/rc[06].d. Make sure the script is
executable. I'm not sure if the shutdown process waits for your script to finish or if it times out, but it doesn't hurt to give it a try (and post back here as I'd be interested to know ).

If you're in the situation where your backup scripts aren't run regularly because your machine is never on when cron runs things you might consider installing anacron. This means it will run missed jobs when the machine starts up, this might slow you down for a few minutes after you start the machine though.
 
Old 01-08-2006, 08:48 PM   #7
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Original Poster
Rep: Reputation: 30
Let's see if I understand your suggestions.

'Create your script file, say /etc/rc.d/rc.local.stop,'
This means to save the script in /etc/rc.d as rc.local.stop

' create links to it in
the two directories /etc/rc.d/rc[06].d'
This means 'ln -s /etc/rc.d/rc.local.stop /etc/rc.d rc[06].d'

'If you're in the situation where your backup scripts aren't run regularly'
I want the bkup script to run when the computer is turned off.

dlw
 
Old 01-08-2006, 08:51 PM   #8
d1l2w3
Member
 
Registered: May 2004
Location: Amboy WA USA
Distribution: Mandriva 2007
Posts: 366

Original Poster
Rep: Reputation: 30
How do I make rc.local.stop executable?
I don't know how as root in a konsole.

dlw
 
Old 01-08-2006, 08:56 PM   #9
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
Quote:
How do I make rc.local.stop executable?
Code:
chmod ug+x
Quote:
This means 'ln -s /etc/rc.d/rc.local.stop /etc/rc.d rc[06].d'
yes, a link to /etc/rc.d/rc.local.stop in each of those directories
 
  


Reply


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
Backup question TomH37 Linux - Software 1 05-24-2004 06:32 PM
Backup question gchandler Red Hat 1 05-24-2004 02:55 PM
Backup Question tuxedo-notebook Linux - General 5 04-16-2004 11:26 AM
Backup question Swift&Smart Linux - Software 2 06-18-2003 03:59 PM
Backup question chuck77 Linux - General 1 03-21-2002 02:45 AM


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

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