Save Folder Backup and Restore

Miscellaneous tools
Message
Author
User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#21 Post by rufwoof »

spiritwild wrote:Good job, the Izop compression was much faster than I was aware of. I'm keeping this one around :)
Similar compression speed to LZ4 however LZ4 isn't a common busybox compression option. For restores LZ4 is much quicker, it can decompress using multi-cores at speeds approaching ram speeds. Compression isn't as tight however as the likes of gzip.

All-told lzo level 1 is a good choice IMO, more readily available (in busybox) and compressed size (disk IO) versus speed has a nice balance (what is lacks in compression tightness it makes up for (and more) in speed). My preferred choice of kernel (initrd) compression (unless lz4 is available).

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

#22 Post by drunkjedi »

rcrsn51 wrote:Excellent. Are you doing "hot" backups from a running Puppy?
All my runs were doing "hot" backup of savefolder on Fatdog.
But my saveinterval is zero so that would also give no problem. Maybe setting saveinterval to zero on savefiles will work too.

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

#23 Post by rcrsn51 »

@rufwoof: Are you providing a test report on this specific project?

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

#24 Post by musher0 »

drunkjedi wrote:
rcrsn51 wrote:Excellent. Are you doing "hot" backups from a running Puppy?
All my runs were doing "hot" backup of savefolder on Fatdog.
But my saveinterval is zero so that would also give no problem. Maybe setting saveinterval to zero on savefiles will work too.
Hi drunkjedi and all.

I've been using SFR's PackIT to lzop, lz4, even zip the pupsave of the
Puppy from the Puppy itself for years. I never had a problem.

Just make sure there is no other operation going on in the Puppy when
you do it. And if you have defined save intervals, no expected pupsave
update in the next three minutes.

Also the following should be obvious: the destination archive of this
archiving operation has to be outside the pupsave, in
/mnt/home/"PuppyDir", next to the pupsave file. Do not edit the PackIT
default directory and you'll be fine.

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

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

Re: Save Folder Backup and Restore

#25 Post by sheldonisaac »

rcrsn51 wrote: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.
Thanks a lot, rcrsn51.
I installed the SFB and the lzop pets, and tried it on a 472K folder with two files in it. It made a tax.2017-04-22.sfb file of 374K in about 1 second.

---------

Booted tahr6.0.6 again, this time with pfix=ram
Installed the two pets.
Used SFB to save a 386MB save folder
to a 238MB tahrsave-feb26.2017-04-22.sfb
Took about 10 seconds.

Restored it (to a different partition) in 4 seconds
Dell E6410: BusterPup, BionicPup64, Xenial, etc
Intel DQ35JOE, Dell Vostro 430
Dell Inspiron, Acer Aspire One, EeePC 1018P

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

#26 Post by spiritwild »

shameless praise.....

This is still the single greatest backup tool on the whole damn planet. :D

Edit: out of curiosity, is it possible to add a line to the code that will play a sound when "done" ?

Sometimes I'm not at the pc and a notification would help me out.

I have a soundfile I like and use aplay in scripts, I'm not familiar with GTK though.

Thanks!!

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

#27 Post by rcrsn51 »

The program is /usr/sbin/SaveFolderBackup. Between lines 17 and 18, insert a line like:

Code: Select all

aplay /path/to/soundfile.wav

frenchiveruti
Posts: 120
Joined: Wed 15 Feb 2017, 14:00

Doesn't restore

#28 Post by frenchiveruti »

Hello! I'm having an issue, I have a big SFB file (~3.5GB) in my flashdrive, and when I want to "restore" it, It just says "done" but it does nothing.
Is there a commandline that I can use to do the same restore action and actually see if there's something wrong?
Thanks.

The issue is with lzop pet you gave, it doesn't install correctly, I ended up compiling from source so no big deal luckily. Thanks

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

#29 Post by rcrsn51 »

It's using

Code: Select all

lzop -d -c "source file" | tar -x -C "destination folder"
The issue is with lzop pet you gave, it doesn't install correctly,
In which Puppy are you working?

But how were you able to make the backup in the first place if lzop wasn't working?

frenchiveruti
Posts: 120
Joined: Wed 15 Feb 2017, 14:00

#30 Post by frenchiveruti »

rcrsn51 wrote:It's using

Code: Select all

lzop -d -c "source file" | tar -x -C "destination folder"
The issue is with lzop pet you gave, it doesn't install correctly,
In which Puppy are you working?

But how were you able to make the backup in the first place if lzop wasn't working?
Well I made the backup on my TahrPupx64 and now I'm on a RAM puppy that's literally clean, so I was able to make the backup on my "save-session" puppy, but not able to restore it on my "RAM session" because of this issue.

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

#31 Post by rcrsn51 »

There are two lzop PETs - 32bit and 64bit. Are you using the right ones?

frenchiveruti
Posts: 120
Joined: Wed 15 Feb 2017, 14:00

#32 Post by frenchiveruti »

rcrsn51 wrote:There are two lzop PETs - 32bit and 64bit. Are you using the right ones?
Oooh DUDEEE I never saw that description!
Hahahaha
Srry!

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#33 Post by bigpup »

This is a bump, so this very good program, gets some daylight in the forum.
I hate the way stuff goes deeper and deeper, into the pages of this forum.
A lot of good programs, are lost, when they get 40, 50, 60 70, pages down, into forum sections.

Note:
I suggest you put the download, for the latest version of the 32bit and 64bit, in the first post of this topic.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#34 Post by rcrsn51 »

bigpup wrote:I suggest you put the download, for the latest version of the 32bit and 64bit, in the first post of this topic.
There is only one version of SaveFolderBackup. The 32/64bit refers to the optional lzop packages, as is already stated.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

Re: Save Folder Backup and Restore

#35 Post by bigpup »

This is the first post in this topic.
Where does it say SaveFolderBackup pet package will work on 32bit or 64bit Puppy versions?

If you are going to post the 32bit version of lzop pet on this first post.
Make it easy to find the 64 bit version, by also putting it in the first post.

You may think putting a note in the comment for the lzop 32bit pet will always be seen by people.
Not! :shock: :lol:
Peoples minds do not always work that way :!: :roll: :lol: :lol: :lol:



rcrsn51 wrote: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.

-----------------
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#36 Post by bigpup »

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.
I wonder if it would not be a problem, as long as the save file or folder, was not being written to, when the backup was being made.
If auto save was setup to not activate.
No other programs running in background.
If it only backs up the already written save and gets nothing from the save ramdisk.

Another save backup program has this help info.
Attachments
Screenshot.jpg
(46.66 KiB) Downloaded 110 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
glene77is
Posts: 196
Joined: Tue 17 Aug 2010, 22:09
Location: Memphis, TN, USA
Contact:

#37 Post by glene77is »

bigpup wrote:
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.


>>> Good Point.
Good that you mention this "caveat" .


"Hot Backup" script on the "Current SaveFILE/SaveFOLDER".
that only works if SnapMergePuppy has finished
is not a "SAFE" "Hot Backup" .


As we recall, from reading the original "SaveFolderBackup v1.2" code.
it calls SnapMergePuppy ('SMP') prior to calling the compression function.
We are guessing that this would probably beat 'SMP' to the punch
... but that is not guaranteed.
'SMP' should be disabled from auto-save.

We only use "saveFOLDER" method ,
and SnapMergePuppy auto-save is disabled.
We wrote our own Save2Flash routine, iconed on desktop,
and purposely disabled auto-save.
We do not use SaveFolderBackup v1.2 ,
instead we wrote our own,
with the goal of being "Simple", "Readable", "Modifiable".
When we wrote "B2T" ..
we did not call for SnapMergePuppy.

IMO, The best method is to use saveFOLDER,
and disable the auto-save,
and do frequent 'HotBackups"
letting a DateTimeSeconds stamp prevent duplications.
"rc.shutdown" still 'asks-to-save', on a 3 second wait.

We used the original "SaveFolderBackup v1.2" for a long time,
but when we changed our systems,
we are not mounted on "/Mnt/Home/"
and the program was cumbersum in the Select-Box
... so we wrote our own which pulls controlling Source and Target info
directly from '/etc/rc.d/PUPSTATE' and automating our standard input.
Early this year we re-wrote it to be "Simple" "Readable" "Modifiable"
We can use it as a "tutorial" script, with good results.

So, that is the method we use with "B2T" in our systems.
[ B2T presented at
http://murga-linux.com/puppy/viewtopic.php?t=118076

In the long run, for any amount of money paid for our projects,
we cannot protect the user from himself.

Puppy Linux is more fun than a barrel of M$ monkeys :P
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.

Post Reply