Author |
Message |
PaulBx1
Joined: 16 Jun 2006 Posts: 2307 Location: Wyoming, USA
|
Posted: Sun 29 Oct 2006, 11:26 Post subject:
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.
Last edited by PaulBx1 on Mon 30 Oct 2006, 22:50; edited 1 time in total
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 12807 Location: Stratford, Ontario
|
Posted: Sun 29 Oct 2006, 11:48 Post subject:
|
|
For me, the biggest advantage of using the so-called frugal install is that I can access my pup_save.3fs file from Windows. I can then make a pup_save.zip file which is about 30% of the original size. It is small enough to move around on a flash drive and I can reimage my Puppy setup in a minute.
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13647 Location: Karlsruhe, Germany
|
Posted: Sun 29 Oct 2006, 13:58 Post subject:
|
|
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
|
Back to top
|
|
 |
vern72023
Joined: 26 Dec 2005 Posts: 158 Location: Jacksonville Fl
|
Posted: Sun 29 Oct 2006, 14:10 Post subject:
|
|
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
_________________ george
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Sun 29 Oct 2006, 14:28 Post subject:
|
|
Quote: | you must type "xwin" to start X the first time |
you can delete /etc/.XLOADED before the backup ... for example:
#!/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 Sun 29 Oct 2006, 23:07; edited 1 time in total
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13647 Location: Karlsruhe, Germany
|
Posted: Sun 29 Oct 2006, 14:49 Post subject:
|
|
oh yes, fine.
If I don't forget it, I will add it to the Muppy-toolbox in Muppy.
After I added some more tools, I'll make a dotpup of it.
Mark
|
Back to top
|
|
 |
PaulBx1
Joined: 16 Jun 2006 Posts: 2307 Location: Wyoming, USA
|
Posted: Sun 29 Oct 2006, 19:12 Post subject:
|
|
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.
|
Back to top
|
|
 |
vern72023
Joined: 26 Dec 2005 Posts: 158 Location: Jacksonville Fl
|
Posted: Sun 29 Oct 2006, 22:46 Post subject:
|
|
i wouldn't infer that Paul
there are no open files in pup_save - it is loaded fully into ram -
I always copy it from within puppy
george
_________________ george
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Sun 29 Oct 2006, 23:28 Post subject:
|
|
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
|
Back to top
|
|
 |
PaulBx1
Joined: 16 Jun 2006 Posts: 2307 Location: Wyoming, USA
|
Posted: Mon 30 Oct 2006, 11:31 Post subject:
|
|
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.
|
Back to top
|
|
 |
marksouth2000
Joined: 05 Apr 2006 Posts: 620
|
Posted: Mon 30 Oct 2006, 13:54 Post subject:
|
|
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
|
Back to top
|
|
 |
Pizzasgood

Joined: 04 May 2005 Posts: 6266 Location: Knoxville, TN, USA
|
Posted: Mon 30 Oct 2006, 16:55 Post subject:
|
|
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.
_________________ 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

|
Back to top
|
|
 |
PaulBx1
Joined: 16 Jun 2006 Posts: 2307 Location: Wyoming, USA
|
Posted: Mon 30 Oct 2006, 22:49 Post subject:
|
|
Glad to know Puppy is so forgiving. However just to satisfy my paranoia, when I do a copy of the pup_save I will close all apps first. Heck of a lot easier than booting into ram or Windows though.
|
Back to top
|
|
 |
|