A mod to save2flash + snapmergepuppy + savepuppyd
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
A mod to save2flash + snapmergepuppy + savepuppyd
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.
"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.
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
Menu --> Network --> PureFTP starts an ftp server which serves files out from a dedicated directory called /root/ftpd...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.
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?
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.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?
______
Dennis
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.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
______
Dennis
I am pre woof using 4.12 snapmergepuppy ,but if the newer
has this line too it needs this edit
Joe
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
exclusions from SnapMergePuppy
No reason to save ".cache" ?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?
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.
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
"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.
******************
#
* 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.
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.