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 Tue 16 Sep 2014, 21:48
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Restore Pupsave file hotbkup saved files.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sat 01 Oct 2011, 03:29    Post subject:  Restore Pupsave file hotbkup saved files.
Subject description: A restore script for your Pupsave-backup files.
 

After a heck of a lot of work and testing, I have made a restore script for pupsave files backed up with 2byte's HotBkp for frugal pups.
It works ok and I have did minor error checking on blank entry windows.
The hardest part was getting the progress bar to work and that was just due to coding errors.
No warranty is supplied with this script and you can examine it before you run it.
Just remember to drag and drop your backed up pupsave file and the destination directory to the entry windows and Hit the Restore button.
If you fail to do so, you will be greeted with a full progress bar and a message in a red window you will have to close along with the progress bar window.
I could have made that cleaner, but I wanted to stay away from external temporary files.
DO NOT TRY THIS SCRIPT FOR NORMAL FILE COPY!
EDIT:
I made some changes and you now can also use the script for file copy. You cannot copy multiple selected files all at once though.


So here it is. Try it and let me know what you think.

It is also an example of using a progress bar with an actual application.
PupsaveRestore.tar.gz
Description  My modified script that now allows file copy along with pupsave file restore.
gz

 Download 
Filename  PupsaveRestore.tar.gz 
Filesize  1.53 KB 
Downloaded  300 Time(s) 

Last edited by 8-bit on Sun 02 Oct 2011, 03:05; edited 3 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11063
Location: Arizona USA

PostPosted: Sat 01 Oct 2011, 20:37    Post subject:  

Does this only work with pupsave files or could I use it to copy a directory containing a bunch of mp3 audio books to a mp3 player?
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sat 01 Oct 2011, 21:25    Post subject:  

Flash, I have never tried using it to copy multiple files to a destination directory.
I guess I will have to back up my pupsave file and give it a try.
Remember though that if a number of files is copied to a directory located in a frugal install, you can overflow it really quick.
It happened to me!
No check is currently done to make sure there is room on the destination for the file to be copied/replaced.

2byte knows how to write code for that check and I have not been able to decipher it or it would have been included.

Just thought about it some more. Short answer is NO.
Reason is it was not made to handle multiple files and so I do not think the progress bar would work along with one might end up with one very large file with a very large name composed of all the files.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11063
Location: Arizona USA

PostPosted: Sat 01 Oct 2011, 22:08    Post subject:  

Okay, thanks. I might give it a try anyway just to see what happens. I have several USB flash drives I'm not using at the moment.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sat 01 Oct 2011, 23:46    Post subject:  

Flash and others,
DO NOT USE my script for copying files. It contains a sed command that is relying on the file being a valid pupsave backup file from hotbackup and that sed command removes the last 19 characters,dots,dashes from the filename.
So if you try to copy a file like "/root/gtkdialog_template.sh" to another directory you end up with a file called "gt" which is the original filename with the last 19 characters,dots,underlines,dashes gone.
If I was smarter, I could check for the characters "BKP" in the file name and bypass that sed command if "BKP" was not part of the filename.
But for now, I have to say it is only for the purpose it was made for.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sun 02 Oct 2011, 02:08    Post subject:  

Boy have I been busy!
I have again updated PupsaveRestore.sh to allow user to also use it to copy files from one location to another.
You can still use drag and drop for the file source and destination directory. But the difference now is that a long file name does not get truncated during the copy process and the script still works as it did before to restore pupsave files.

The updated script is in the first post.
Back to top
View user's profile Send private message 
Henry

Joined: 29 Jul 2006
Posts: 829
Location: Oregon USA

PostPosted: Sun 02 Oct 2011, 16:05    Post subject: Can't run PupsaveRestore.sh  

Hello, fellow Oregonian,

I've been using the excellent Pupsave Hot Backup, now v 1.3, for years, Your restore sounds very handy, avoiding a reboot, copy, and rename, another reboot, etc.

I can't get this script to run. Where should it be put?

I'm using QuirkyNop-1.2 with Xfce, Thunar, no rox.

My pupsave looks like this:
qrkysave-A.2fs

A typical pupsave backup looks like this:
qrkysave-A.2fs.BKP-11.10.01-18.23

Thanks in advance for any advice.
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sun 02 Oct 2011, 17:37    Post subject:
Subject description: Getting it to run
 

That you cannot get it to run is most likely my fault.
At the end of the script is a line that starts it with gtkdialog4.
Truthfully, I do believe that if you change that line to gtkdialog3 it should run ok.
Or you could visit bkhome.org/blog/ and get the compiled PET for gtkdialog4 from there.
But for now, it will save me making yet another revision if you open the script in geany and edit the line from gtkdialog4 to gtkdialog3.

Also, I have never tried restoring (replacing) a pupsave that is in use and would not recommend it.
Back to top
View user's profile Send private message 
Henry

Joined: 29 Jul 2006
Posts: 829
Location: Oregon USA

PostPosted: Sun 02 Oct 2011, 18:23    Post subject:  

Thanks,

That fixed it.

However I seem to have misunderstood the intent of the program. I somehow thought you had found a magic way to "hot" restore also. Should have known Smile.
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sun 02 Oct 2011, 18:34    Post subject:  

Since Puppy runs in memory, restoring to a saved version can cause problems if you are running the version you are trying to restore.
It would have been nice, but that is just too advanced for my limited programming ability.
It is also the reason why one should never rename his pupsave while puppy is running.
Back to top
View user's profile Send private message 
ASRI éducation


Joined: 09 May 2009
Posts: 2440
Location: France

PostPosted: Sat 17 May 2014, 11:18    Post subject: pupsaverestore-0.0.2_20140512  

pupsaverestore-0.0.2_20140512 # added gettext # added version # improve GUI
Tested with Puppy Precise 5.7.1
Cordialement,
pupsaverestore-0.0.2.jpg
 Description   
 Filesize   21.22 KB
 Viewed   203 Time(s)

pupsaverestore-0.0.2.jpg

pupsaverestore-0.0.2_20140512_NLS.pet
Description 
pet

 Download 
Filename  pupsaverestore-0.0.2_20140512_NLS.pet 
Filesize  1.52 KB 
Downloaded  61 Time(s) 
pupsaverestore-0.0.2_20140512.pet
Description 
pet

 Download 
Filename  pupsaverestore-0.0.2_20140512.pet 
Filesize  3.04 KB 
Downloaded  90 Time(s) 

_________________
Projet ASRI éducation => Association | Forum | Dépôt | Espace kids
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
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.0707s ][ Queries: 13 (0.0074s) ][ GZIP on ]