Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Preventing backup on shutdown< Next Oldest | Next Newest >
colinbes Offline





Group: Members
Posts: 41
Joined: May 2004
Posted: Oct. 19 2006,23:24 QUOTE

Am using DSL with frugal install on compact flash with restore option enabled. After updating to new package (I was way, way behind) I noticed that on shutdown the backup script is run. In my application it is important that the backup script is not automatically executed, especially on shutdown.

Any suggestions on how to prevent this (obviously restore must happen automatically on startup).

Thanks,
Colin
Back to top
Profile PM 
andrewb Offline





Group: Members
Posts: 316
Joined: July 2005
Posted: Oct. 20 2006,00:12 QUOTE

Simplest way is to pull the plug rather than executing the shutdown script. Might need to make sure you sync any drives first though to avoid any data loss due to buffering.

If you want to disable backup delete the file .backup_device in /opt. This will prevent a backup ocurring. However it won't stop a restore being done at the next boot if an earlier backup.tar.gz file exists on one of the filesystems found during booting. You either need to delete all such files, or boot with the norestore option.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Oct. 20 2006,01:27 QUOTE

backup and restore go hand in hand. If you have specified a restore boot time option then that becomes the target backup device.

The backup device can be easily cleared using the Backup/Restore  Button from control panel, then select the None button.

However, from your requirements,i.e,, wanting a restore but no further backup. implies that your backup.tar.gz is static.

That is the very definition of our extension type tar.gz.

So I would suggest renaming your backup.tar.gz to something like myconf.tar.gz and then use the standard mydsl options to load it.

This will prevent you from having to clear the backup device upon each boot.

Note: Depending on what other extensions might be loaded, you may wish to rename your backup.tar.gz to something that would ensure it will be loaded/restored last. Doing so will better emulate the natural order of restoration where the backup files are restored after all other mydsl extensions.


Edited by roberts on Oct. 20 2006,01:28
Back to top
Profile PM WEB 
colinbes Offline





Group: Members
Posts: 41
Joined: May 2004
Posted: Oct. 20 2006,02:07 QUOTE

Pulling the plug would not be an option in an unattended site and in any case we monitor ups and do a safe shutdown in event of power failure. Unfortunately remove .backup file in /opt would most probably stop restore from working.

I did think about using extension mechanism but decided to go backup/restore route (which on version 0.9.3 didn't do backup on shutdown) as we do have occasion, when system is updated or reconfigured, to execute new backup. This has provided a safe environment with a rollback feature (simply reboot to restore last env) allowing user to test application changes before commiting changes via backup.

I suppose I could remove the .backup and create it when running backup...
Back to top
Profile PM 
andrewb Offline





Group: Members
Posts: 316
Joined: July 2005
Posted: Oct. 20 2006,04:07 QUOTE

Removing .backup_device wouldn't affect the restore function as all that does is look for the first instance of backup.tar.gz that it finds on the filesystems. Roberts suggestion of seleting 'none' in the backup tool of DSL panel should achieve the same result.

The issue with restoring looking for ANY backup.tar.gz is that if you have used one device (say /dev/hda1) & you then change to using a different one (e.g. /dev/hda3) the old backup.tar.gz on hda1 will always be used by restore as it will be found first when the filesystems are searched as it has a lower number (1 vs 3). Similarly if you change from using e.g. /dev/hda3 to using /dev/hda1 & then decide to cancel using the backup AND delete the backup.tar.gz file on hda1, the old backup.tar.gz on hda3 will be found at the next reboot & the settings in that will be reloaded.

I have had problems with the backup system using the runlevel 2 boot option. It appears not to restore, but it does a backup, thus resetting everything to the default values. There probably does need to be some tweaking of the backup restore system to remove anomalies such as this, & possibly give the option of deleting/renaming the backup file when 'none' is selected in the backup tool.
Back to top
Profile PM 
8 replies since Oct. 19 2006,23:24 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Preventing backup on shutdown

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code