Does puppy auto-sync the pup001?

Using applications, configuring, problems
Post Reply
Message
Author
Brian C

Does puppy auto-sync the pup001?

#1 Post by Brian C »

We have had a series of random/unexpected power outages around here, which have caused my puppy linux live-cd computer to shut down. Does puppy automatically syncronise itself with a pup001 file on my HD at regular intervals? Can I make it?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

you could create a small shellscript

script: mysync

Code: Select all

#!/bin/bash
sync
sleep 180
$0
Save it as /usr/local/bin/mysync
Make it executable in a consolewindow with this command:
chmod 755 /usr/local/bin/mysync

Add the line
/usr/local/bin/mysync &

to /etc/rc.d/rc.local0 (as second line after the line "#!/bin/sh")
so that it runs automatically, when you boot puppy.

It will write changes to disk every 3 minutes (180 seconds).

Mark

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

maybe this would be better:

Code: Select all

#!/bin/bash
sync
sleep 180
exec $0
or maybe:

Code: Select all

#!/bin/bash
while true
do
  sleep 180
  sync
done
i think ext3 automatically does a sync every 5 seconds anyway (ext3 is optimised for reliablility), unless it was mounted with other options ... i don't know if ext2 does an automatic sync every 5 seconds

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#4 Post by Pizzasgood »

to /etc/rc.d/rc.local0
Actually, use /etc/rc.d/rc.local instead. You use rc.local0 for a remaster, but otherwise you use rc.local.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

Brian C
Posts: 168
Joined: Thu 09 Feb 2006, 04:19

#5 Post by Brian C »

Is there a way to sync a multisession disk manually? When I shut down Puppy, the multisession disk doesn't always burn like it's supposed to, and I'd like the opportunity to sync it while I'm still booted in Puppy.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#6 Post by BarryK »

Brian C wrote:Is there a way to sync a multisession disk manually? When I shut down Puppy, the multisession disk doesn't always burn like it's supposed to, and I'd like the opportunity to sync it while I'm still booted in Puppy.
Well, the puppy2 saving at shutdown should potentially be more reliable,
when we get the bugs out of the alpha release that is.
saving back to DVD is a simple script, that can be launched periodically, or manually by
a icon on the desktop -- TedDog posted an example one line of script that does
that for puppy2 - see the Cutting Edge section I think. I intend to include the desktop icon in the beta release.

Post Reply