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 18 Feb 2020, 10:33
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
BackUp Script "pupsave-back-2-tar"
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [13 Posts]  
Author Message
glene77is


Joined: 17 Aug 2010
Posts: 171
Location: Memphis, TN, USA

PostPosted: Wed 12 Feb 2020, 11:16    Post subject:  BackUp Script "pupsave-back-2-tar"
Subject description: Back-2-Tar
 

Guys,
... BackUp Utility for Puppy Linux.
...
UPDATE 20-02-17
.
We have uploaded a zip file "a-b2t-scripts... zip"
This is "B2T" 'Back-to-Tar' , for Frugal saveFOLDER ,
our very modified version of 2byte's "Hot Backup" v.1.2 .
Very Happy PUPSTATE now controls the program ! Very Happy
.
We have fixed or hid some little bugs from the original.
.
Purpose and Methods of B2T has been defined tighter.
We have aimed at simpler and readable coding.
Still more stream-lining and culling is in progress.
Some Working Notes still in this "work-in-progress".
We are in process of culling extraneous routines .
All Real Useful Documentation Notes will remain in the code.
.
Our goal is to make the code "readable" and "modifiable" by others.
.

Features for Puppy Linux saveFolder Backup :
(1) "B2T" creates backup filename with 'y-m-d-s' date-time-stamp.
(2) "B2T" automatically selects fast compression via ".tar".
(3) "B2T" runs OK on Puppy 32-bit Frugal SaveFolder installs
... in EXT2/3/4 drives and Ext4 Flash-Drives.
(4) "B2T" makes use of the system PUPSTATE file.
.
Our script has been tested successfuly on our 32-bit Frugal saveFOLDER :
* Slacko 632
* Xenial 708
* Tahr-606
* UpupBB-19.03 +10, +12, +14, +16, +17, +18
.

Addendum :
We keep our working scripts inside of the /etc/rc.d/ folder.
We link our /etc/rc/d/ scripts into the "application" subdir,
which places them in the pup-main-menu.
However, running scripts can be kept on hard-drive media OK
and shared among several Puppy Linux OS installs.

.
Make certain your file type and permissions are properly set,
as we find it easy to 'loose' some properties/type/permissions via copy/zip.
...
Location in "/etc/rc.c" keeps our work totally separate via the saveFOLDER backup system, and un-touchable from any mods/improvements that PeaBee may do in the future.
.
...
Our career projects , in radio and electronic design
are sampled / published at www.GeoCities.WS/glenE77is/
and are published / reviewed in Europe on ResearchGate.net.
..
Also Referenced under "Hot Backup for Frugal Pups"
http://www.murga-linux.com/puppy/viewtopic.php?p=1042561#1042561
http://murga-linux.com/puppy/posting.php?mode=editpost&p=1048269
.
We invite comments.
.
rc.z_B2T-200217-0743.zip
Description  Back-2-Tar ( B2T ) scripts. Custom script for backup saveFOLDER into tar.gz format.
zip

 Download 
Filename  rc.z_B2T-200217-0743.zip 
Filesize  237.76 KB 
Downloaded  0 Time(s) 
rc.z_S2F-200217-0742.zip
Description  Save-2-Flash script. Some simplification and splash.
zip

 Download 
Filename  rc.z_S2F-200217-0742.zip 
Filesize  1.2 KB 
Downloaded  0 Time(s) 
B2T-main.jpg
 Description   B2T main page
 Filesize   84.04 KB
 Viewed   23 Time(s)

B2T-main.jpg

B2T-Help.jpg
 Description   B2T help / doc page
 Filesize   166.05 KB
 Viewed   23 Time(s)

B2T-Help.jpg


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

Last edited by glene77is on Yesterday, at 13:19; edited 8 times in total
Back to top
View user's profile Send private message Visit poster's website 
davids45


Joined: 26 Nov 2006
Posts: 1256
Location: Chatswood, NSW

PostPosted: Wed 12 Feb 2020, 18:00    Post subject:  

G'day glene77is,

Thanks for this version of the very useful Hot-Save-Backup utililty.

I'll try running it as a link from my data partition to /etc/rc.d/ and also in several 64-bit Pups which sometimes don't include the original Hot-Save-Backup.

If all goes well, I'll make an sfs of your Backup Scipt and combine it with my all-applications-as-links sfs which I run in my Pups.

David S.
Back to top
View user's profile Send private message 
davids45


Joined: 26 Nov 2006
Posts: 1256
Location: Chatswood, NSW

PostPosted: Thu 13 Feb 2020, 19:18    Post subject: SFS works and in 64-bit  

G'day glene77is,

I've made an sfs of your 3 Backup Script files to load them into /usr/bin/ and then an sfs of the files as links to my data partition. The original three files are kept here, every other use now will be as links back to these original files.

I also edited the .desktop file of the old hot-save backup pet to point to the new files and added that to the sfs (via another link). This adds a menu entry for the BackUP Script.

The links sfs ran well in several 32-bit Pups so I then ran it in some 64-bit Pups and had no problems creating backups of the save-files in these.

I'll add the 32-bit and 64-bit sfs to my all-apps-as-links sfs to automatically load this in each Pup I start up.

Thanks for this nice revision of a much appreciated 'old' utility.

David S.
Back to top
View user's profile Send private message 
glene77is


Joined: 17 Aug 2010
Posts: 171
Location: Memphis, TN, USA

PostPosted: Fri 14 Feb 2020, 04:48    Post subject:
Subject description: B2T 32bit and 64bit and sfs and menu-enry
 

David45,
So, where in the world is 'Chatswood, NSW' ?

Thank you for trying B2T.
We run it dozens of times each day.

"This adds a menu entry for the BackUP Script."
Never thought of that. We are accustomed to drag-n-drop to desktop.
.
We use make good use of linking SFS files, and unlinking.
This keeps our saveFolder size down to 70 MB, or so,
which makes B2T runs rather quick. .

Thank you for your work to make this neat little backup prg
into "SFS" with a "puppy menu option".
.
We keep our saveFolderName as "upupbbsave-BB19+17-0102" static.
All the saveFolderName.BKP...datetimesttamp.tar.gz files
provide a standard format and alphabetical order for history/restore.
.
We also backup the core/current version of our developmental subdir
into the '/etc/rc.d/ '
so that B2T will catch everything.
.
We like backup routines to be semi-automated.
Here is a little story about my experience with BackUp Priorities.
.
Back 20 years, we worked in a site
which used Unix, SCO-Unix, M$-Dos, M$-2000 servers.
System backups were done every 30 days, manually.
we were accustomed to doing backup every 15 minutes.
..
Editing/developing/maintain was done on M$-2000 servers.
All development was done on a "live" system,
Everything ran 'real time' on Sco/Unix servers.
The terminals for edit/dev/maint were on M$-2000 server.
The link between all these passed across several servers.
.
When we started, we took over a large development (FoxPro Sco-Unix)
which was written in a "skinny" style ( no notes, no comments ) .
There were bugs and illogical / extraneous routines everywhere.
Edit/dev/maint was done "live" inserting at certain times during the day.
.
My writing method has never been"skinny". ( as this 'reply' shows !).
We have always included embedded notes/comments/documentation
in a "keyed" manner to identify the various levels/priorities of comments.
We used "Keys" such as "*(:" and "*(!:" typically,
making the code-prg and sub-code blocks very "readable"
( if you are into "reading" code ! ) .
We had a prg routine in FoxPro which scanned all text (prg) files
and extracted notes, and formed a single "developers documentation" file.
This proved very handy when discussing 300K lines of code with the boss.
.
So, our prg files blossomed up in size.
The original size of the prg was less than 32K ,
un-readable, and un-maintainable and full of bugs and trash
( which is why they hired us on contract ! ) .
.
So, when our prg with copious comments approached 64K filesize
we discovered a fatal buffering problem.
One of the servers which the code passed over ,
on the way to the Sco-Unix box ,
had a "8.3" name limit and a "buffer limit" of 64 K.
When the "buffer limit" was exceeded, the file was "truncated" !!!
and there was NO "buffer limit error flag".

.
It was a good thing that we had routines similar to B2T
which we just kicked-in every 15 minutes.
Because we had lots of restoring to do, until we could split-up
my large files into many small files.
Instead of embedded calls to encapsulated subroutines,
we had to use many calls to small files on the server.
.
So our back-up routines (like B2T) saved the day,
But, the company still had 37K dupe invoices, over two million dollars ,
all mailed out.
They never could fix that because there was
a PrimeKey UUID system that was 'randomly' picked,
and did not include a system Date-Time-Stamp.
.
Life is a real " Hoot! " if you are wide awake !
.

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

Last edited by glene77is on Sat 15 Feb 2020, 07:57; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
davids45


Joined: 26 Nov 2006
Posts: 1256
Location: Chatswood, NSW

PostPosted: Fri 14 Feb 2020, 19:03    Post subject:  

G'day glene77is,

Thanks for the extended reply to my posts.

The menu entry (.desktop file) would be helpful for Puppy newcomers. There are already many utilities included in the various Pups that can be hard to know where they are, let alone what they do.

If it's of interest, here's the text of my desktop file - putting the B2T script in /usr/bin means the 'Exec=' line doesn't need a different path to 'normal' for me. But the old and the new backup utilities both use the same .svg icon although the linked B2T has an arrow on its icon (see attachment).

Quote:
[Desktop Entry]
Encoding=UTF-8
Name=PupBackup2Tar
Icon=/usr/share/pixmaps/puppy/copy_disk.svg
Comment=Hot backup for frugal save files
Exec=pup-Back-2-Tar
Terminal=false
Type=Application
Categories=Archiving
GenericName=PupBackup2Tar


Dragging the executable to the desktop is for those already 'in the know' but a menu entry in say, 'Utilities', increases the chances of it being found and used by 'newbies' and included by the Puppy developers in coming Pups.

Quote:
We use make good use of linking SFS files, and unlinking.
This keeps our saveFolder size down to 70 MB, or so,
which makes B2T runs rather quick.


Using symlinks for as much as I can (caches, thumbnails, profiles, Downloads, as well as program files), I get concerned/annoyed if a Puppy's savefile exceeds 5MB, so your 70MB looks big to me Shocked Very Happy .

But I only do a savefile backup every week or so if I'm not trying anything radically new in a Pup. I've found Puppy very tolerant and stable and my years-old hardware is also troublefree (so far) so I'm a bit blase about backups. The speed, ease and simplicity of the hot-save-backup utility probably adds to my possible lack of 'proper' concern.

David S.
Chatswood, between Artarmon & Roseville, NSW Wink .
B2Tdesktopicons-64bitPup.jpg
 Description   Old & new hot-save backup icons on desktop of a Bionic64Pup
 Filesize   115.42 KB
 Viewed   96 Time(s)

B2Tdesktopicons-64bitPup.jpg

Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 800

PostPosted: Fri 14 Feb 2020, 22:04    Post subject:  

@davids45
G'day glene77is was emphatic about SaveFolders, but in 2 of your posts it appears you have modified B2T for use with SaveFiles. Can you post your modified version or what changes you made, please.
TIA

_________________
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

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


Joined: 17 Aug 2010
Posts: 171
Location: Memphis, TN, USA

PostPosted: Fri 14 Feb 2020, 22:31    Post subject:  

davids45

Excellent !
Have Implemented your hints and suggestions.
Prg are visible in pup Menu ( /usr/share/applications )
and run OK.

Have attached my latest mind-toys. 200217-1000
Have more cleaning to do in B2T.
.
After I have read your comments,
I plan to move these into the "Filesystem" topical area.

C'Later !
avatar_davids45_5184815234f5ae7f6e8767.jpg
 Description   Great Avatar!!!
 Filesize   2.25 KB
 Viewed   2 Time(s)

avatar_davids45_5184815234f5ae7f6e8767.jpg

rc.z_S2F-200217-0742.zip
Description  Save-2-Flash Save RAM into saveFOLDER, with-out running SnapMergePuppy.
zip

 Download 
Filename  rc.z_S2F-200217-0742.zip 
Filesize  1.2 KB 
Downloaded  0 Time(s) 
rc.z_C3C-200217-0616.zip
Description  Clear-3-Cache clean the cache before running S2F .
zip

 Download 
Filename  rc.z_C3C-200217-0616.zip 
Filesize  1.61 KB 
Downloaded  0 Time(s) 
rc.z_M2R-2002-0907.zip
Description  Move-2-Rcd move developing files into /etc/rc.d/ for standard calling.
zip

 Download 
Filename  rc.z_M2R-2002-0907.zip 
Filesize  1.32 KB 
Downloaded  0 Time(s) 

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

Last edited by glene77is on Yesterday, at 13:24; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2447

PostPosted: Sat 15 Feb 2020, 00:29    Post subject:  

Who's "we"?
_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
glene77is


Joined: 17 Aug 2010
Posts: 171
Location: Memphis, TN, USA

PostPosted: Sat 15 Feb 2020, 07:08    Post subject:
Subject description: B2T
 

s243a,

"We" is a literary mechanism
by which usage we reduce the egotistical "I"
( which is a grandiose presentation of 'I am my work, and it is great' ).

Use of 'We' is like wearing a 'mask' .
Use of "I" is like saying "I am great".

My 'works' are posted in the 'profile', elsewhere.
Here, 'we' only speak about this software project.

See you later.

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
Back to top
View user's profile Send private message Visit poster's website 
glene77is


Joined: 17 Aug 2010
Posts: 171
Location: Memphis, TN, USA

PostPosted: Sat 15 Feb 2020, 07:53    Post subject:
Subject description: B2T for 'saveFILES' ?
 

B.K. Johnson,
We are !Glad! you have an interest in this little project.
We do not write programs as 'plug-n-play' projects,
but rather as 'custom-fit' projects.
.
Our process in this little project
involved 'modifying' 2bytes v.1 code,
not 'creating' a new backup program.
Some of the original 2byte features were
good but overly complex
and some were left behind in the process.
.
Our goal was 'readability'
so that B2T would be an educational tool,
and and B2T would allow future 'modifiability'
so that others could make improvements.
One stated goal was that "/etc/rc.d/PUPSTATE" file
should control filename/path data,
which, singularly, would eliminate much complexity.
.
In analyzing the code, tracing the method and process,
it seems to us that 2byte was aiming for a Backup
which would include 'saveFILES' and 'saveFOLDERS'.
Here, in our systems,
we switched from 'saveFILE' to 'saveFOLDER'
when they first became available,
about when Slacko came out, about 2013.
This was because we like to massage code, muck with code,
morphing it to suit our personal usage.
We also like being able to transfer files/programs
between Puppy versions,
which is easy to do with saveFOLDERS.
.
Due to the layers of development by 2byte,
we found the original coding overly complex and intertwined.
The original was under documented, difficult to 'read'
... although we must say
(1) 2byte had a great idea
(2) it "worked" smoothly and very well.
( if you are the type that likes to 'read' code blocks).
.
Therefore, we simplified our efforts ,
and we focused only on our own developmental systems
which are the 'saveFOLDER'.
.
As soon as I have tested B2T on our one 'saveFILE' system
I will post the results.
You can try it for yourself and post your results.

HTH

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
Back to top
View user's profile Send private message Visit poster's website 
davids45


Joined: 26 Nov 2006
Posts: 1256
Location: Chatswood, NSW

PostPosted: Sat 15 Feb 2020, 18:50    Post subject: Save-folders only backing up  

G'day B. K. Johnson,

Sorry for misleading you with my sloppy wording.

I did not modify "their" ( Very Happy ) script to back-up a save-file, just added a desktop file to their script package that had been written for backing up the Frugal's save-folder.

I much prefer Puppies with flexible save-folders to the old-fashioned, rigid save-files.

Because I run most applications and other sym-linkable things from my common boot-mounted data partition, all Puppies on my computers have quite small Save-folders (~5MB average) so 'wasting' MBs with a mostly empty 512MB save-file per Puppy has no attraction.

I take it you had tried this B2T script with a save-filed Pup and it did not work? This seems to be the 'extra challenge' for the hot-save-backup to handle save-files as well as save-folders?

David S.
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 800

PostPosted: Sat 15 Feb 2020, 20:17    Post subject:  

davids45 wrote:
Quote:
I take it you had tried this B2T script with a save-filed Pup and it did not work?
No, didn't try B2T.
.

_________________
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

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


Joined: 17 Aug 2010
Posts: 171
Location: Memphis, TN, USA

PostPosted: Sat 15 Feb 2020, 22:45    Post subject: Re: Save-folders only backing up  

davids45


Quote:
I much prefer Puppies with flexible save-folders to the old-fashioned,
rigid save-files.

Agreed. Having a tool like B2T
makes frequent back-ups very easy.
Extraction and Restoring from 'this mornings saveFOLDER'
is very convenient for mode 13 installs.

To respond to your interests :
We setup a Puppy UpupBB install, sda1 hard-drive, frugal, saveFILE.4fs.
We ran Hot-Backup and it worked.
We ran B2T and it failed to write into the saveFILE.4fs.
We ran B2T modified and it wrote into the "base" './' subdir OK ,
. but that leaves SnapMergePuppy
. to transfer into a fixed-size saveFILE.4fs,
. and that can possibly over-write the limits.
. The fix for that is to increase the saveFILE.4fs volume size,
. so then you may have a 1Gig volume size. Hard to tell.
. In the original prg, there was an option to select
. an alternate subdir on real hard-media (did not work).
. In fixing this bug, I simply dropped the function.
. Now we see what this was intended to do on mode 12 installs.
. SnapMergePuppy is called by '/usr/sbin/save-to-flash'
. and includes this test :
. . /etc/rc.d/PUPSTATE
. if [ $PUPMODE -ne 13 ] ; then
. echo "save2flash: Wrong PUPMODE ($PUPMODE)"
. exit 1
. fi
..............................................................................................................
.
We noticed, in terminal mode, that 'tar'
was removing all the leading '/' from all filenames,
during the 'tar' process.
.
We tried modifying the params sent to 'tar'
and had one save to the base "/" directory successful.
The problem we see is that when SnapMergePuppy runs
it will possibly run out of saveFILE.4fs volume space,
and fault, corrupting the saveFILE.4fs.
In our case, it made the RAM size larger
than the current saveFILE.4fs size the system faulted
and we lost the saveFILE.
.
We have looked at fixing/simplifying the original code,
but it seems to have been written with an early Puppy OS in mind,
and everything after that was layered and intertwined
making it appear obfuscated
( although I do not think that was anyone's intention. )
.
In examining options,
sampling optional params to send 'tar' ,
re-writing blocks of code,
etc.,
our best 'opinion' is that
the manipulating of params to 'tar' will be the best approach.

(1) DO NOT attempt to save to RAM,
because the system SnapMergePuppy may fail,
and corrupt the file.
We lost one saveFILE.4fs this way.

(2) DO try saving the saveFOLDER.BKP.... tar.gz
to a hard media, such as the hard-drive or flash-drive.

Results of first run-thru :
(1) DO use a new B2T_4fs.sh script.
(2) DO send the 'tar' savefile-4fs....tar.gz to hard media ,
such as 'sda1,/mnt/home/...' .
(3) DO NOT send the 'tar' savefile-4fs...tar.gz
into the saveFILE-4fs as this is not logical on an encapsulated file. .
SnapMergePuppy is the only program
which should process new data into the saveFILE.4fs.

Having comments on our work
makes this geeky old geezer have a much nicer day.
Thanks for your interest and suggestions and queries.

Now, got to go fry some other fish !

c'later

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [13 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
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.0806s ][ Queries: 13 (0.0201s) ][ GZIP on ]