Hot Backup for Frugal Pups Updated 2011-10-1

Miscellaneous tools
Message
Author
2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#31 Post by 2byte »

Hello Baldygo and 8-bit

I have uploaded a new version. See the first post.


nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#32 Post by nooby »

Crazy noob question. if it is only 3.3 kb big then why does it need to be .tar.gz

during my later 3 years as a perennial noob I barely get what a .tar.gz is
and would not even touch such with a long pole for to not get badly bruised. :)

How big will it get if you let us download it as a pet or what to name it.

is it a pet or script? both maybe. What am I supposed to do with it?

Yes I know it pops up a GUI and it does Back Up that is why I want to
use it. But how does one install it if it is not a pet or sfs?

Edit Thanks for the .pet
Last edited by nooby on Sun 25 Sep 2011, 17:43, edited 1 time in total.
I use Google Search on Puppy Forum
not an ideal solution though

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#33 Post by keniv »

Hello 2byte

Have just downloaded and used version 1.1 with 258. It worked well but at the end I could not exit the gui screen as the "quit" button was greyed out. Would not close by clicking on "x" or right click "close" and I had to "kill" it to remove it. The file it generates is shown as executable. Is this correct? I know it would have to be renamed to be used as a savefile. Other than the small problem outlined above I think this is a great little program. At this small size it might even be worth including in any further updates of 258.

Regards,

Ken.

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#34 Post by 2byte »

Hi nooby

It’s just a bash script. To make it easier for you I have uploaded it as a .pet. It will install the script to /root/my-applications/bin/. You can drag the Pupsave-backup file onto your desktop to make a shortcut to run it.

I had created a menu entry for it but there are problems with the menu system or something in lupu 5.28 and it will not run from the jwm menu there, so there is no menu entry for the installation.


2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#35 Post by 2byte »

Hello keniv

Had the green popup message appeared when you tried to close it? The Quit button should be greyed out only while the backup is in progress. And no, the backed up file should not be executable. See the pic below.

General thoughts: What type of system setup are you running? Partition type you are saving to? Bash and gtkdialog version? Running from a virtual machine? If you are saving to ntfs (not recommended by the way) was the disk defragged first? Save files have been created on vfat (32 bit), ntfs (again, not recommended), ext2 and ext3 partitions.

Maybe there were applications running that interfered?

The script uses bash and gtkdialog (and therefore GTK) and has been tested on the official releases. There are a lot of versions of Puppy/bash/gtkdialog/GTK floating around and it is impossible for me to test on every combination. With over 500 downloads and only a couple of reported problems I am curious as to why it had problems for you.

.
Attachments
properties.jpg
(56.66 KiB) Downloaded 995 times


keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#36 Post by keniv »

Hello 2byte

I am using an old Toshiba laptop, Plll, 800MHz with 320MB ram. I am using a ntfs as I have a copy of XP on this machine. I rarely use XP but I do keep it up to date in terms of win and anti-virus stuff. Defrag says that disc does not need defraged which I think is probably correct as other than what I have mentioned above I have not installed or uninstalled any software since the last defrag. I am booting from a cd. I have both the savefile (ext3) and the .sfs saved to the hd. Bash is version 4.1. Gtkdialog is 0.7.21. The popup message had appeared and I had clicked okay. I did not have any other applications running other than those that control my wifi connection. I did not have a browser running. I have attached what I get when I click on "properties" for the backup file generated. Hope this helps.

Regards,

Ken.
Attachments
backup.png
(57.57 KiB) Downloaded 622 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#37 Post by 8-bit »

2byte, it is not just keniv experiencing the backups being marked as executable.
I just checked all of my backups from both the early and later versions of Pupsave-backup and they all are shown as executable using Properites.
I can live with that, but if you meant for them not to be that is changeable in your script.
So you have two users that have now brought that to your attention.
But I think they are supposed to be that way as the pupave that gets backed up is also shown as executable and on a restore, if it is not, will it mess up booting?
So far, to restore, one copies the backup to the original pupsave name in the related directory.
If the backup file is changed as far as the executable permissions, then restoring to the saved backup will also have those changed permissions and possibly not boot.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#38 Post by 8-bit »

As a followup, I wonder what the permissions on keniv's original and my original pupsave files was.
It is easy enough to change them.
To take permissions back to original, you would add a line to Pupsave-backup of "chmod 644 name of pupsave backup file.

As to the numbers, I made a small jpg.
Attachments
mode_graph.jpg
Small jpg showing what numbers mean to change permissions on a file
(22.25 KiB) Downloaded 940 times

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#39 Post by seaside »

Anytime the .xxx extension changes, the filetype icon might change as well. For example any pupsave.2fs will have an "0&1bits" icon. If you rename it to "pupsave.2fsBAK", the icon will change to a "gear" because it no longer ends with ".2fs".

Apparently, any "wrapper" or "container" type file (tar,zip,iso,pet,sfs,2fs, etc.) need not be made executable in order to work their activity of mounting or decompressing.

Out of all my files of this type, only about 30% are marked executable, but they all work anyway.

Cheers,
s

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#40 Post by 2byte »

Ah, I should have realized what was going on with the permissions. Your file was saved to ntfs and neither ntfs nor vfat preserve Linux permissions! The files inside the savefile are ok, they are isolated in a linux filesystem. Use Puppy and check the permissions on any file in ntfs. They all show as executable to everyone. At any rate, as seaside pointed out, those permissions will not harm the backup.

8-bit, FWIW I would not presume to alter anyone's file permissions, so the script just uses a straight cp command to to do the backup.

keniv, do you have a swap file or swap partition? With only 320 MB ram I wonder if that could be an issue. Otherwise I can't think of anything right now that might cause the dialog to freeze.

Thanks for taking the time to look into this.

@nooby You're welcome. I hope it works well for you.
.


keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#41 Post by keniv »

Hello All

Thanks for your responses. I was a bit worried about the change in permissions because when I had made manual backups in the past the permissions did not change. However I did not rename them. I stored them in a directory named with the date of the backup as in /mnt/home/linuxbackup/puppysave/backup520/june2011. This far down puppy does not see the backups when booting. From what has been said in the last couple of posts I am reassured that the files inside the save file on the ext3 linux file system are not affected.

2byte

I do have a swapfile the size of which is decided by puppy (though I think it can be set manually) and seems to be populated by puppy at bootup. I have attached the output from permissions for this file. I still have no idea what caused the dialog box to freeze but I think I will re-download and try again just in case the original was corrupted. I'll post what happens with this.

Thanks again,

Ken
Attachments
pupswap.png
(36.01 KiB) Downloaded 949 times

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#42 Post by keniv »

Hello All

I have tried again. This time I did not even run the wifi but still got the same outcome after the backup was complete with a greyed out "quit" button and a box which can only be removed using "kill". I have no idea what the problem is.

Regards,

Ken.

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#43 Post by 2byte »

hi keniv

I’m out of ideas at the moment too. There will be one more version upgrade that I intend to upload tonight. It addresses a non-fatal warning and has a completely clean shutdown in bash 4.1. Maybe those changes will make a difference in your case. It might be worth a try.

Regards,
2byte


keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#44 Post by keniv »

Hello 2byte

I will download and try your new version when you upload it and report back on what happens.

Thanks again,

Ken.

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#45 Post by 2byte »

New version uploaded. See the first post.

Regards,
2byte


User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#46 Post by 8-bit »

I found something interesting in your Pupsave-backup file.
I know it works as is, but the line "<label>"<span color='blue'>Pupsave file to backup</span>"</label>" according to another script on span is wrong.
It should be "<label>"<span color= '"'blue'"'> for that part of the span code.
That is color= single quote, double quote,single quote,color,single quote, double quote, single quote.

At least, when I tried that line in a short script, it kicked out a gtk error.
Maybe I am missing something in looking at the code.

Also, I get the same file named 0 when I run the Pupsave-backup script.
Could it be a matter of a variable not being populated that is the path/filename of one of the temp files?
Last edited by 8-bit on Wed 28 Sep 2011, 00:48, edited 1 time in total.

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#47 Post by keniv »

Hello 2byte

I installed your new .pet but I am now having a different set of problems. It opens extremely slowly. When setting the path to where the backup is to be stored each page again is very slow to open. This was not the case with the original script. I decided at this point something must be wrong and did not try to make a backup. It also installed a file named "0" in/my-applications/bin (see attached).
I found a version of this file after deleting the previous script but at that time did not know where it had come from. I had trouble deleting this file. Should this file be created? I have come to the conclusion that this is not going to work with my set up although I still don't know why. I think I will have to go back to manual backups.

Thanks again for trying to get it to work with my setup.

Regards,

Ken.
Attachments
bin.png
(28.27 KiB) Downloaded 896 times

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#48 Post by 2byte »

Hi keniv

I want to thank you for spending your time on this. It has been extremely helpful to me for getting bash 4 compatibility.

I never noticed the 0 file until you mentioned it. It seems that bash 4 doesn't like 'if' comparisons that have a > as part of the equation. At least not the way I had constructed them in bash 3. That caused the latest problem with the 0 file. It was being recreated every 0.2 seconds. No wonder it was hard to delete while the gui was running. Ditto for the slow operation, which was not noticeable on my rig. This is fixed now but I think I'll wait before uploading it.

With this bash 4 business it seems to me like every time one bug is fixed, two more are created.

Once again, thanks Ken
Regards,
2byte


User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#49 Post by darkcity »

added software to wiki under name PupsaveBackup
http://puppylinux.org/wikka/PupSaveBackup

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#50 Post by keniv »

Hello 2byte

Thanks for your reply and explanation of what was going on. I am glad that it may not be a peculiarity of my system that has been causing the problems I have been having. When you are ready to upload again I will have another go at getting it to work on my system. I still think its a great idea.

Regards,

Ken.

Post Reply