How to properly back up Puppy? (solved)
How to properly back up Puppy? (solved)
In various discussions it's been said that backing up pup_save.3fs is just a matter of using the "cp" command. But I wonder about things like open files within the mounted pup_save volume. Is it really kosher to cp the same pup_save that you booted with? Do you have to close all applications first, and do a "sync" command to flush any cached writes? Or would it be better to boot into ram without using the pup_save, mount the volume the pup_save is located on, and then cp it? Or is that going overboard?
I did search around for this info but had no luck finding it.
I did search around for this info but had no luck finding it.
Last edited by PaulBx1 on Tue 31 Oct 2006, 02:50, edited 1 time in total.
I backup right after I booted Puppy (from the running puppy itself).
So almost no files are saved back.
Small (uncritical) issue:
when you boot again from a restored backup, you must type "xwin" to start X the first time, as Puppy did not yet write back his "note" for a proper shutdown.
So it (wrongly) thinks it crashed last time.
Mark
So almost no files are saved back.
Small (uncritical) issue:
when you boot again from a restored backup, you must type "xwin" to start X the first time, as Puppy did not yet write back his "note" for a proper shutdown.
So it (wrongly) thinks it crashed last time.
Mark
i use the savepuppy that pizzagood posted but with an added line to copy the existing pup_save to pup_save.bak before forcing a save of the scurrent contents of ram back to pup_save
>>>>>>>>>>>
#(c) Copyright Barry Kauler 2006 www.puppylinux.com
#Adjusted by Pizzasgood (10/03/06) to just save the session.
#backup current pup
cp /mnt/home/pup_save.3fs /mnt/home/pup_save.bak.3fs
........
then the rest of his savepuppy whicyh really onlytweaks the original code from barry anyway
i am sure there are other tweaks that could be done to that to meet any backup need - like numbering, daily, weekly, etc, etc etc
the great thing aboout puppy (on usb or frugal anyway) if the flexibility that the use of a pup_save offers and the ease of scripting such tweaks
George
>>>>>>>>>>>
#(c) Copyright Barry Kauler 2006 www.puppylinux.com
#Adjusted by Pizzasgood (10/03/06) to just save the session.
#backup current pup
cp /mnt/home/pup_save.3fs /mnt/home/pup_save.bak.3fs
........
then the rest of his savepuppy whicyh really onlytweaks the original code from barry anyway
i am sure there are other tweaks that could be done to that to meet any backup need - like numbering, daily, weekly, etc, etc etc
the great thing aboout puppy (on usb or frugal anyway) if the flexibility that the use of a pup_save offers and the ease of scripting such tweaks
George
george
you can delete /etc/.XLOADED before the backup ... for example:you must type "xwin" to start X the first time
#!/bin/sh
rm -f /etc/.XLOADED
sync
tar cjf /mnt/home/pup_save.3fs.tgz /mnt/home/pup_save.3fs
Last edited by GuestToo on Mon 30 Oct 2006, 03:07, edited 1 time in total.
Thanks for the suggestions, guys.
I would infer then that it is not really a good idea to copy the same pup_save you booted with, due to open files (system logs and the like). And that going into Windows and doing the copy, or booting into ram and doing it, would be good solutions, if a bit tedious.
I would infer then that it is not really a good idea to copy the same pup_save you booted with, due to open files (system logs and the like). And that going into Windows and doing the copy, or booting into ram and doing it, would be good solutions, if a bit tedious.
As far as i know, the save file is not in ram, unless the save file is on a flash drive. It's not totally safe to save the file system while it's being used, but it probably will work ok most of the time. I think ext3 file systems automatically sync every 5 seconds anyway, unless it was mounted with that option disabled.
by the way, terabyteunlimited's Image for Windows can backup a Windows partition while Windows is running ... i've never tried it myself
by the way, terabyteunlimited's Image for Windows can backup a Windows partition while Windows is running ... i've never tried it myself
Yes, it's my understanding the pup_211.sfs is loaded into ram, not (generally) the pup_save.3fs.
An example of an open file would be the system log, /var/log/messages. If Seamonkey is running, I suppose things like the bookmark file or a profile may be open, or the email files. So at the very least, it shouldn't be done with applications running.
An example of an open file would be the system log, /var/log/messages. If Seamonkey is running, I suppose things like the bookmark file or a profile may be open, or the email files. So at the very least, it shouldn't be done with applications running.
-
- Posts: 622
- Joined: Wed 05 Apr 2006, 20:43
Paul, your concerns about reading (possibly) open files are probably over-paranoid. The worst that can happen is that you end up with an out-of-sync bookmark or log. The real problem would be if two processes were writing to the same file at the same time, but that is sterk verboten in Linux.
Cheers,
Mark
Cheers,
Mark
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
One complication with copying a running savefile is if you are in mode 13 (USB and sata drives). You can check the /etc/rc.d/PUPSTATE file to see. 12 is normal, with the savefile directly mounted. 13 has the savefile read-only, and any changes you do are stored in ram, then copied back every 30 minutes and on reboot. So if you are in this situation, copying it may not preserve your most recent changes. The SavePuppy script I uploaded will save it immediately, so that way you can backup the recent changes.
I have made many backups that way and haven't noticed any problems yet. Actually, they weren't so much backups as saving, renaming the savefile with a number in front so Puppy doesn't load it, syncing, and hard-resetting. Probably not a good idea in a normal Puppy setup, but mode 13 seems to handle it okay.
Just do what you feel comfortable with.
I have made many backups that way and haven't noticed any problems yet. Actually, they weren't so much backups as saving, renaming the savefile with a number in front so Puppy doesn't load it, syncing, and hard-resetting. Probably not a good idea in a normal Puppy setup, but mode 13 seems to handle it okay.
Just do what you feel comfortable with.
[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]
[img]http://www.browserloadofcoolness.com/sig.png[/img]