Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Dec 2014, 22:47
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Hot Backup for Frugal Pups Updated 2011-10-1
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 6 [88 Posts]   Goto page: 1, 2, 3, 4, 5, 6 Next
Author Message
2byte

Joined: 09 Oct 2006
Posts: 357

PostPosted: Sat 12 Dec 2009, 17:08    Post subject:  Hot Backup for Frugal Pups Updated 2011-10-1
Subject description: Backup your live save file
 

Pupsave Hot Backup v1.3 Updated 2011-10-1

Users upgrading to v1.3 should uninstall any previous version.
PHB no longer installs to /root/my-applications/bin. Files are now installed with Linux FSH in mind:
/usr/bin/pupsave-hot-backup
/usr/local/pupsave-hot-backup/phb_core
/usr/share/applications/Pupsave-hot-backup.desktop

Latest testing with:
gtkdialog4 (gtkdialog-0.8.0) and gtkdialog3 (gtkdialog 0.7.20 and 0.7.21)
Bash 4.1.0(1)-release and 3.00.16(1)-release

Menu entry now included (Pupsave Hot Backup).

Fileselect dialogs now open by default to /mnt.

The default save to location now matches the partition or partition/directory of the active pupsave.

*.4fs save files supported.

The backup button is now disabled while a backup is in progress and also during the following error conditions:
1) Trying to backup to the active pupsave file.
2) The storage device is not mounted.
3) The chosen file is not a valid pupsave file (*.2fs, *.3fs, *.4fs.)
4) Not enough free disk space. (file size + 100 MB required).

Added a safety catch and popup notice if more than one backup for the same file is started before the backup name auto-regenerates (regeneration is every 60 seconds).

Code changes to prevent 'NOT ENOUGH DISK SPACE' from displaying while a backup is in progress. This would happen if a 1024 MB save file was backed up to a 1500 MB partition when the free space dropped below 1124 MB. Harmless, but kind of disconcerting.

Work-around to prevent JWM from freezing when running from a JWM menu in Lupu 5.28.

Bugfix: File named '0' no longer continuously created when using Bash 4.1.


Update Version 1.2 2011-9-27

Bash 3.0 and 4.1 compatible
gtkdialog3 and gtkdialog4 compatible (gtkdialog-0.7.21-thunor224-w5.pet)
Changed window geometry to accommodate longer file names.
Message popup when backup is finished. ( thanks 8-bit )

Bug fixes:
Fixed orphaned processes after program close.
Fixed bug that would only allow save locations to two directory levels in newer Puppies.
Removed non-functioning close button in the help window.
Misc code improvements

Tested on:
Classic Pup 214X
Puppy 4.12
Lucid Pups 5.1.1, 5.2.0, 5.2.8(Bash 4.1)
Wary 5.1.99 alpha
Lighthouse Pup 503 G (Bash 4.1)

A tiny gtkdialog utility for backing up the live pupsave file. You no longer need to reboot with pfix=ram in order to backup the savefile. Lots of built-ins and safety features make it very "oops" proof.

Auto-detects the current savefile.
Generates the backup file name with the date and time appended.
Checks the available space for the backup file.
Will not perform the backup if anything is incorrect.
Displays real-time status and progress feedback.
Supports 2fs and 3fs save file types.

It's easy fast and works very well.
.
PupsaveHotBackup-1.3.pet
Description  Version 1.3 Updated 2011-10-1
pet

 Download 
Filename  PupsaveHotBackup-1.3.pet 
Filesize  4.3 KB 
Downloaded  1354 Time(s) 
hotbkp.jpg
 Description   
 Filesize   28.31 KB
 Viewed   9662 Time(s)

hotbkp.jpg


_________________


Last edited by 2byte on Sun 02 Oct 2011, 01:25; edited 16 times in total
Back to top
View user's profile Send private message 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Sat 12 Dec 2009, 17:33    Post subject:  

thanks
Back to top
View user's profile Send private message Visit poster's website 
alienpup


Joined: 18 Oct 2009
Posts: 9
Location: Arizona, USA

PostPosted: Sat 12 Dec 2009, 17:53    Post subject: Re: Hot Backup for Frugal Pups
Subject description: Backup your live save file
 

2byte wrote:
A tiny gtkdialog utility for backing up the live pupsave file..

What can I say 2byte, but simple, small, clean, wonderful. Puppy has needed just such a utility for a very long time. Really very well done.

One suggestion. Gzip the backup. That'll squeeze the air out of it Wink.

Thank you very much!
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 888

PostPosted: Sat 12 Dec 2009, 21:09    Post subject:  

Very nice gui for copying a "hot" file - But, some caution is in order.

The filesystem may be writing when you do this and problems can happen. Here's some further explanation of what to watch out for....

http://www.murga-linux.com/puppy/viewtopic.php?t=46682&sid=9615ccfe73526124b2c750262351b559

Quote:
The only surefire method to make and verify an exact copy is to not try copying a mounted image - i.e. using pfix=ram instead.



s
Back to top
View user's profile Send private message 
2byte

Joined: 09 Oct 2006
Posts: 357

PostPosted: Sun 13 Dec 2009, 00:01    Post subject:  

@alienpup
Thanks for the compliments, I hope it serves you well.
Quote:
Gzip the backup. That'll squeeze the air out of it
Yeah, deleting all of my code comments would knock a chunk out of it too Smile

@seaside
Caution noted. Common sense applies here. As noted in the help dialog, shut down all of your apps before running the backup. I have been backing up in just this manner for about a year now using a hard coded script without any problems whatsoever. Also the utility runs e2fsck on the backup as a safety measure and doesn't need pfix=fsck on the next boot.

Speaking from experience, installing software or trying a new version of Puppy is much more dangerous to your savefile. Wink
.

_________________

Back to top
View user's profile Send private message 
alienpup


Joined: 18 Oct 2009
Posts: 9
Location: Arizona, USA

PostPosted: Tue 15 Dec 2009, 23:45    Post subject:  

2byte wrote:
@alienpup
Quote:
Gzip the backup. That'll squeeze the air out of it
Yeah, deleting all of my code comments would knock a chunk out of it too Smile.

Perhaps you misunderstood me. I refer to compressing the newly backed pup_save file, not your code. Pup_save's are "sparse" files whose free space is highly compressible.
Back to top
View user's profile Send private message 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Wed 16 Dec 2009, 15:08    Post subject:  

that was a joke...
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Thu 17 Dec 2009, 18:21    Post subject:  

Heh, this has got me thinking about how to do a proper hot-backup, but all methods are vastly more complicated than pfix=ram.

I think if you are using pupmode 13, you're safe copying the 2fs file as long as it's not currently saving. The RAM layer should prevent block-level filesystem corruption, but maybe not logical corruption (if one of your apps was in the middle of an update when the last save occured).

However you need to be aware that the backup will only be current up to the last save.
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3398
Location: Oregon

PostPosted: Sun 14 Feb 2010, 01:43    Post subject:  

There is one thing that got me wondering about the pupsave file size.
If you set up a 2 gig pupsave with the increase pupsave.2fs size and then do a Hot Backup of your pupsave file, is the free space preserved?
In other words, when Hot Backup creates a new ext2 file for copying the contents of your pupsave.sfs file to, how does it know how big to make the destination file?
Maybe that is a dumb question, but I had to ask.

I did try running an e2fsck on the backed up pupsave file that was created and it comes out clean.
My desktop widget for Puppy Space shows 1.72gig -443.18 Mib.
It previously showed 1.72gig - 800 Mib before I did an e2fsck of it from outside of it. In other words, it was not in use.
The created backup pupsave was 1.79 gig.

So I guess my main question is to if the original size of the pupsave file is preserved?
Back to top
View user's profile Send private message 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Sun 14 Feb 2010, 11:54    Post subject:  

BUG:

After it has copied the pupsave it then uses 100% cpu and does not give you the done message.
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3398
Location: Oregon

PostPosted: Sun 14 Feb 2010, 12:22    Post subject:  

ambushcrafter,
What Puppy version are you using it on?
Also, do you have any Desktop Widgets running that access information from the internet?
Any application that involves writes other than Hot Backup should not be running.

As to the bug, I also noticed that the "Done" message does not stay up.
This is due to a few lines of code that first write the word "Done" to a temporary file to be displayed, then a line that waits a specified period of time, and finally writes "" to the temporary file.
I have to agree that would be good to change to be persistent after the backup completed and cleaned up on exit from the program.
Back to top
View user's profile Send private message 
aarf

Joined: 30 Aug 2007
Posts: 3620
Location: around the bend

PostPosted: Sun 14 Feb 2010, 12:50    Post subject:  

i just copy mine while it is mounted and in use, both for live ssd and semi-live SD. never had problems. do a click target save immediately before the semi-live pupsave save. all are 32mb minimums containing only narcissistic mods, so what can i lose anyway. anything that is not absolutely necessarily in the pupsave isn't in there. works for me.
_________________

ASUS EeePC Flare series 1025C 4x Intel Atom N2800 @ 1.86GHz RAM 2063MB 800x600p ATA 320G
_-¤-_

<º))))><.¸¸.•´¯`•.#.•´¯`•.¸¸. ><((((º>
Back to top
View user's profile Send private message Visit poster's website 
abushcrafter


Joined: 30 Oct 2009
Posts: 1447
Location: England

PostPosted: Sun 14 Feb 2010, 15:27    Post subject:  

8-bit wrote:
What Puppy version are you using it on?

PuppyLinuxVersion: 431
8-bit wrote:
Also, do you have any Desktop Widgets running that access information from the internet?

No.
8-bit wrote:
Any application that involves writes other than Hot Backup should not be running.

No apps are running.
Back to top
View user's profile Send private message Visit poster's website 
recycler


Joined: 25 Jul 2007
Posts: 122
Location: New Zealand

PostPosted: Mon 15 Feb 2010, 02:31    Post subject: backups
Subject description: here is how i do it
 

Backing up is a Good Thing - so much easier than trying to sort out the mess otherwise when something goes wrong.

So I install two puppies on every machine which I use or setup. One is the 'working' puppy and the other is intended only to allow backups to be made.

I usually create a separate partition for the backups of say 3gig. Booting into the first puppy which i call 'setup and backup' allows me to backup the other installation of puppy while it is not running. For extra peace of mind also back up the puppy which allows me to backup the 'working' puppy. And making a backup copy of the backup is a natural extension of this exercise! I love the frugal installation option because it does make a complete backup so easy - only one file to copy.

Hope someone finds this idea useful.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3398
Location: Oregon

PostPosted: Mon 15 Feb 2010, 17:38    Post subject:  

I am curios though as to if just copying the Pupsave file to a new location as a backup fixes a corrupt file system in it.
If you run e2fsck on the pupsave file backed up (by the copy method),
does e2fsck report it as clean?
Using Hot Backup to create a dated backup of the pupsave file does report it is clean using e2fsck.
All it takes for my pupsave file I am using to have e2fkck report stuff that needs fixing is to reboot to another Puppy and check the file.
And if I do it a number of times switching back and forth between booted versions, it seems the pupsave file never really gets unmounted cleanly.
I am open to arguments on this and a remedy.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 6 [88 Posts]   Goto page: 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0940s ][ Queries: 13 (0.0050s) ][ GZIP on ]