-   Mandriva (
-   -   backup question (

d1l2w3 01-05-2006 08:54 AM

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


Padma 01-05-2006 02:04 PM


I assume it goes nowhere. AFter all, if the computer is off, the script can't run.

d1l2w3 01-05-2006 05:36 PM

Yea, that question is confusing.
What I want is a backup to happen
during the shutdown process.

Where would this script go?


rrsc16954 01-06-2006 05:17 PM

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.

d1l2w3 01-07-2006 09:36 AM

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.


tkedwards 01-08-2006 07:28 PM

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.

d1l2w3 01-08-2006 08:48 PM

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.


d1l2w3 01-08-2006 08:51 PM

How do I make rc.local.stop executable?
I don't know how as root in a konsole.


tkedwards 01-08-2006 08:56 PM


How do I make rc.local.stop executable?

chmod ug+x

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

All times are GMT -5. The time now is 07:16 AM.