How to properly back up Puppy? (solved)

Booting, installing, newbie
Post Reply
Message
Author
PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

How to properly back up Puppy? (solved)

#1 Post by PaulBx1 »

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 Tue 31 Oct 2006, 02:50, edited 1 time in total.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

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.

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

#3 Post by MU »

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

vern72023
Posts: 158
Joined: Mon 26 Dec 2005, 05:15
Location: Jacksonville Fl

#4 Post by vern72023 »

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

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

#5 Post by GuestToo »

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 Mon 30 Oct 2006, 03:07, edited 1 time in total.

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

#6 Post by MU »

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

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#7 Post by PaulBx1 »

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.

vern72023
Posts: 158
Joined: Mon 26 Dec 2005, 05:15
Location: Jacksonville Fl

#8 Post by vern72023 »

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

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

#9 Post by GuestToo »

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

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#10 Post by PaulBx1 »

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.

marksouth2000
Posts: 622
Joined: Wed 05 Apr 2006, 20:43

#11 Post by marksouth2000 »

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 8)

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

#12 Post by Pizzasgood »

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.
[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]

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#13 Post by PaulBx1 »

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.

Post Reply