Save Folder Backup and Restore

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

Save Folder Backup and Restore

#1 Post by rcrsn51 »

Update: SaveFolderBackup v1.2 also works with save files. Drag the file into the selection box.

Hint: The best way to use SaveFolderBackup is to backup/restore Puppy X by working from another Puppy Y. Puppy Y could be on a bootable flash drive that also stores the image files.

Doing "hot" backups of save files can lead to big trouble when you try to restore them. But I've had good luck doing it with save folders. YMMV.

----------------------

SaveFolderBackup makes a backup copy of your Puppy save folder by compressing it into a single image file and storing it in another location. You can then restore it if needed. Because the backup image is a file, you can store it anywhere, like on a FAT32 flash drive.

Install the PET and look in the Utility menu.

SaveFolderBackup uses lzop compression. All Puppies have lzop via Busybox, but the "full" version attached below is faster. The PET is built from Debian packages.

You can also use SFB to backup/restore any collection of data. It puts a ".sfb" extension on the image files to distinguish them from other archiving formats.

-----------------
Attachments
lzop_full_32bit_1.03-1.1.pet
This is 32bit! See page 2 for the 64bit version.
Renamed 2017-11-09 to be more obvious
(83.9 KiB) Downloaded 396 times
SaveFolderBackup-1.2.pet
Updated 2017-04-04
Also works with save files
(2.95 KiB) Downloaded 589 times
screenie.png
(61.33 KiB) Downloaded 1596 times
Last edited by rcrsn51 on Thu 09 Nov 2017, 16:36, edited 27 times in total.

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#2 Post by spiritwild »

I'm Using Snap2 ,dd , plain old tar commands. Although, props to whomever wrote the scripts for "system tar and restore", you are my hero.

I'm open to new and improved Linux black magic though so I shall wait patiently and curiously.

.....wait, are you allowed to be curious in Linux or should I be "cautious? :D

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#3 Post by spiritwild »

I didn't have to wait very long :)

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#4 Post by spiritwild »

I'm testing this now. Does the window that pops up that says "working..." , continue in the background if you click the ok button or does it halt the program?

I do see izop running in the background.

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

#5 Post by rcrsn51 »

The process should eventually finish on its own, but you won't get a message. I guess I should remove the OK button.

[Edit] Fixed and reposted above.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#6 Post by drunkjedi »

Hi rcrsn51,
Installed it on Fatdog64 710 after converting it to fatdog's package format.
Installed lzop from Fatdog's Package manager Gslapt.

Took Backup of my savefolder in /tmp/test and restored it again in /tmp/test.

Used diff -r command to check for any difference, none found.

The app works great and fast on Fatdog.

busybox --help on Fatdog doesn't show lzop in "Currently defined functions". So the app may not work if "Full" lzop is not installed.
Are my assumptions correct?

Also about the line 7 in script export LZOPARG="-3"
I assume this argument changes compression level from 1 to 9.
1 will be faster but low compression, 9 will be slower but highly compressed.
Am I right?
Any chance giving user this selection in GUI?

Thanks again for great small app.

Edit: https://www.lzop.org/lzop_man.php says
COMPRESSION LEVELS

lzop offers the following compression levels of the LZO1X algorithm:

-3 the default level offers pretty fast compression.

-2, -3, -4, -5 and -6 are currently all equivalent - this may change in a future release.

-1, --fast, can be even a little bit faster in some cases - but most times you won't notice the difference

-7, -8, -9, --best, these compression levels are mainly intended for generating pre-compressed data - especially -9 can be somewhat slow

Decompression is very fast for all compression levels, and decompression speed is not affected by the compression level.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#7 Post by B.K. Johnson »

@rcrsn51
Any chance of something similar for savefile, even if it is run from an external puppy?
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#8 Post by drunkjedi »

B.K. Johnson wrote:@rcrsn51
Any chance of something similar for savefile, even if it is run from an external puppy?
Savefile is already a file, just copy it somewhere.

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

#9 Post by rcrsn51 »

@drunkjedi: Thanks for testing.

Regarding lzop: Fatdog may already have the "full" version on-board. If SaveFolderBackup is working, it must be there. My attached PET is 32bit, so it definitely won't work. Or does Fatdog now accept 32bit apps?

I have a 64bit lzop PET somewhere, if anyone wants it for the 64bit Puppies.

Regarding the "-3" setting: I figured that anyone who wants to tinker with it can easily modify the script. But I will think about a separate config window. In my tests, "-3" was pretty good.

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#10 Post by drunkjedi »

rcrsn51 wrote:@drunkjedi: Thanks for testing.

Regarding lzop: Fatdog may already have the "full" version on-board. If SaveFolderBackup is working, it must be there. My attached PET is 32bit, so it definitely won't work. Or does Fatdog now accept 32bit apps?

I have a 64bit lzop PET somewhere, if anyone wants it for the 64bit Puppies.

Regarding the "-3" setting: I figured that anyone who wants to tinker with it can easily modify the script. But I will think about a separate config window. In my tests, "-3" was pretty good.
I didn't install Lzop pet you gave.
I installed it from gslapt in fatdog.
Then installed and ran your app.

I never tested specific 32bit apps on fatdog.
But apps like yours which are basically just a script, work without fuss in 32 or 64 bit systems.
Just have to see for their dependencies.

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

#11 Post by rcrsn51 »

@B.K. Johnson: Musher0 has a thread where he discusses running a save file through a compression tool. You could then move the compressed image to a safe location.

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

#12 Post by rcrsn51 »

drunkjedi wrote:Installed lzop from Fatdog's Package manager Gslapt.
Oops. I missed that!

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#13 Post by drunkjedi »

No worries mate.
Also the -3 compression level is good.

And it dicompressed/restored it so fast, I was skeptical. That's why I checked with diff command.

Good app.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#14 Post by musher0 »

B.K. Johnson wrote:@rcrsn51
Any chance of something similar for savefile, even if it is run from an
external puppy?
rcrsn51 wrote:@B.K. Johnson: Musher0 has a thread where he discusses running a save
file through a compression tool. You could then move the compressed
image to a safe location.
Hello, B,K, Johnson.

I can't remember having opened a thread on the subject: it's more like I
said it in passing here and there on the forum. ;)

I use SFR's PackIT to back-up my pupsave file. PackIT offers many choices
as to compression. I prefer lzop, with the slider at maximum compression.
Even so, it's quite fast, considering that pupsaves are usually large files.
(A pupsave being a single file, there's no need to tar it beforehand.)

Also, it's safe to use live from within the same Puppy if it's the only
operation going on.

IHTH


@rcrsn51:
Very useful utility you're offering here!

You did well providing the full lzop. IMO the version by busybox is too
skimpy to be really useful....

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#15 Post by rcrsn51 »

SaveFolderBackup v1.1 posted above. It has a new Abort function in case you make a mistake.

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#16 Post by spiritwild »

Ran well on my Xenial box. It completed the backup with no fuss. I haven't tried to restore so I can't comment on that.

Good job, the Izop compression was much faster than I was aware of. I'm keeping this one around :)

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#17 Post by B.K. Johnson »

drunkjedi, rcrsn51, musher0
Thank you all. I usually just copy the pupsave when running from another puppy.
@musher0
Good to know that
it's safe to use live from within the same Puppy if it's the only
operation going on.
I'll be doing a backup tomorrow.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

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

#18 Post by rcrsn51 »

SaveFolderBackup v1.2 also works with save files. See the note about the best way to run SaveFolderBackup.

User avatar
spiritwild
Posts: 181
Joined: Mon 03 Oct 2016, 10:06

#19 Post by spiritwild »

This is my new favorite utility. I've backed up and restored my partition flawlessly multiple times. 8)

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

#20 Post by rcrsn51 »

spiritwild wrote:This is my new favorite utility. I've backed up and restored my partition flawlessly multiple times.
Excellent. Are you doing "hot" backups from a running Puppy?

--------------------

Here is the 64bit version of lzop-full, made from Debian amd64 packages. It has been tested with some 64bit Puppies (but I can't remember which). If you test it, please report.
Attachments
lzop_full_64bit_1.03-1.1.pet
(79.84 KiB) Downloaded 328 times

Post Reply