Hi,

I wrote a script file (based on rsync) to backup data into a usb memory stick. I intend for the backup to occur during shutdown of the system -part of it- , The computer is for home use and switched on daily for different lengths of time. The OS is Fedora 8.

Using cron is not suitable because the machine is not switched on 24/7.

With anacron I couldn't find a way to time the execution of the script just before shutdown when most of changes to the data have happened. in other words, I do not want the backup to happen after (m) minutes delay since switching on of the computer.

The intention is to make the back up part of the normal process of Fedora 8 shutdown i.e. like modified shutdown process.

Therefore, the goal is to insert the command ($ bash backup_script) in one of the files that get executed during system shutdown, so when the user click on switch off button and the process of shutdown begins, the backup command get executed at probably the start of shutdown and when it finishes, the shutdown process carry on as usual.

The question is in which file i should put the command ($ bash backup_script)?


Thanks in anticipation