A mod to save2flash + snapmergepuppy + savepuppyd

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

A mod to save2flash + snapmergepuppy + savepuppyd

#1 Post by Sit Heel Speak »

My usb-stick frugal install just attempted to perform its routine periodic save, whilst I had a 12 GB partition full of large .tar's symlink'ed to /root/ftpd, so as to transfer them over to another box using PureFTPd (which serves from /root/ftpd) and gFTP (on the other box, to fetch from this box's /root/ftpd).

"Warning, cannot save entire contents," or some such silly complaint.

Suggestion:

When /root/ftpd is a symlink, then make it an exception to the policy of saving everything in the main filesystem.

Might be a good idea to consider the idea of not following symlinks to other things, as well, which are routinely symlink'ed-out to non-mount-home partitions for the purpose of saving space in the savefile, e.g.

/~/.opera
/~/.cpan
/~/.packages
/~/checkout (gnome sources)
/usr/java
/usr/libexec
python2.5 wherever it is (not on a built-up Puppy at the moment)
python2.6
perl/perl5

and others will surely suggest themselves.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

I'm not quite clear, does /root/ftpd contain symlinks to files that are elsewhere?

Anyway, I have added exclusion of "root/ftpd" into snapmergepuppy.
[url]https://bkhome.org/news/[/url]

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#3 Post by Sit Heel Speak »

BarryK wrote:I'm not quite clear, does /root/ftpd contain symlinks to files that are elsewhere?

Anyway, I have added exclusion of "root/ftpd" into snapmergepuppy.
Menu --> Network --> PureFTP starts an ftp server which serves files out from a dedicated directory called /root/ftpd...

Ah, but by cleverly changing /root/ftpd from a regular directory (which is how it is supplied in Puppy) to a symlink, say for example to /mnt/sda9, it is possible to serve out the entire contents of a partition.

Makes it easy and fast to move a laaaaarge batch of files out to another computer. Just start Menu --> Internet --> gFTP on the 'nother computer, point it at the server computer on which /root/ftpd has been made into a symlink to e.g. /mnt/sda9, and whoooooosh.

Ah, but if the server computer is booted from a usb stick...and if snapmergepuppy happens while /root/ftpd is symlink'ed to /mnt/sda9...then, heretofore, snapmergepuppy tries to save the entire contents of /mnt/sda9 to the savefile. If sda9 contains 12 GB of content, but the savefile is only 512 MB, then yikes, snapmergepuppy attempts to fill the savefile with the entire 12 GB. No workee. You get that red warning message at topscreen and a warning that entire contents cannot be saved, and freememapplet goes to 0 bytes left.

Thanks very much for changing it...is the pet in woof official, or are you folding it into the next edition of rootfs-skeleton?

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#4 Post by jemimah »

Another exclusion that might be good is browser caches.

I'd added '.cache' to Puppeee to exclude Chrome's cache, and shutdown is now significantly faster.

I don't think there's any reason you'd really want to save the cache is there?

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#5 Post by DMcCunney »

jemimah wrote:Another exclusion that might be good is browser caches.

I'd added '.cache' to Puppeee to exclude Chrome's cache, and shutdown is now significantly faster.

I don't think there's any reason you'd really want to save the cache is there?
I certainly don't. In Mozilla based browsers, I specify that cache is to be placed in /dev/shm. I can't find an option in Chrome to specify where cache is placed, or I'd do it there, too.
______
Dennis

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#6 Post by jemimah »

There's a command line option to do it in Chrome.

Code: Select all

--disk-cache-dir="CACHE_DIR" --disk-cache-size=N

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

#7 Post by DMcCunney »

jemimah wrote:There's a command line option to do it in Chrome.

Code: Select all

--disk-cache-dir="CACHE_DIR" --disk-cache-size=N
Ah, splendid. Thanks! I hadn't found that yet.
______
Dennis

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#8 Post by big_bass »

I am pre woof using 4.12 snapmergepuppy ,but if the newer
has this line too it needs this edit


Code: Select all

#original snapmergepuppy line# 83 
 - if [ $FILESIZEK -gt $FREEBASEK ];then
 

#fixed big_bass 
+ if [ "$FILESIZEK" -gt "$FREEBASEK" ];then
 
 
Joe

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

exclusions from SnapMergePuppy

#9 Post by glene77is »

jemimah wrote:Another exclusion that might be good is browser caches.

I'd added '.cache' to Puppeee to exclude Chrome's cache, and shutdown is now significantly faster.

I don't think there's any reason you'd really want to save the cache is there?
No reason to save ".cache" ?
One of my browsers ( IRON , U-Light, Mozilla FireFox )
requires a subdir for its profile to reference.
That browser faults,
and then we must copy the subdir in-place to restore function.

Our note on this is :
############################################
#
### Clear these possibly lingering '.cache' subdir,
### which may be 100 MB size and enlarge the saveFolder grossly.
### Note: we have edited the FireFox "U-Light" browser profile
### so that "U-Light" browser will call
### "/root/.cache/light/light/Lite-profile.default"
### This will be our common cache for U-light.
### Other browsers can be handled the same way.
### Note: sometimes we kill FireFox while FireFox is still running,
### so FireFox does not clear the cache.
### This routine clears the left-over trash.
#
############################################

We set our Browsers to 'kill off' extra files on "Shutdown"
but we found that this is not a total 'culling'.

Therefore, due to the large amount of file space used
which is extraneous to the rebooted system,
we have written a simple script "C3C" which manually parses through
a list of subdir that we have verified are not needed after shutdown.

C3C deletes these subdir :
"/var/spool/cups/tmp/*"
"/var/cache/cups/*"
"/root/.cache/mesa_shader_cache/*"
"/root/.cache/event-sound*"
"/root/.cache/light/light/Lite-profile-default/thumbnails/*"
"/root/.cache/light/light/Lite-profile-default/cache2/entries/*"
"/root/.cache/iron/Default/Cache"
"/root/.cache/iron/Default/Media?Cache"
"/root/.config/iron/Default/Service?Worker/*"
"/root/.config/iron/Default/Local?Storage/*"
"/root/.config/iron/pnacl/*"
"/root/.config/iron/EVWhitelist/*"
"/root/.config/iron/ShaderCache/*"

That amounts to sometimes 100 MB transferred into saveDATA.
This can accumulate if one of my custom script projects
does a "Fatal Nose Dive" to the "black screen".

We set our Browsers to 'kill off' extra files on "Shutdown"
but we found that this is not a total 'culling'.

So, Be Thoughtful and Careful about 'deleting' and 'not-deleting'
your system subdir. Research your systems "real" requirements.
Last edited by glene77is on Sat 09 May 2020, 13:07, edited 1 time in total.
Puppy Linux is more fun than a barrel of M$ monkeys :P
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.

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

#10 Post by glene77is »

"SMP" = 'snapmergepuppy'
#
* We have noticed that the original 'old' SMP appeared to 'drop'
some system changes ;
* ie, the changes did not appear in the saveDATA on reboot.
We initiated the practice of always running 'save2flash' several times,
in order to flush the RAM data to the saveDATA.
#
While 'enhancing' the '/usr/sbin/save2flash' script, adding 'splash' ,
We introduced several repetitions of the SMP block.
[ sync ]
[ /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw ]
#
We used GEANY for IDE , and Geany Execute for BASH terminal test/debug.
We observed the following 'non-fatal' error messages.
#
SMP generates 'non-fatal' error messages,
associated with line # 169, and # 171, "unary operator expected".
First run may have 25 messages.
Second run may have 5 messages.
Third run may have 1 messages.
#
We enhanced the current 'new' '/usr/sbin/save2flash' ,
... which used the 'nice' SMP block
[ sync ]
[ nice -n 19 snapmergepuppy ]
#
We observed the same 'problem'.
We managed this problem with the same repetition method.
#
Problem resolved.
******************
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