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 Wed 18 Oct 2017, 18:24
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Daily Backups for Your Puppy
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Thu 16 Mar 2017, 00:07    Post subject:  Daily Backups for Your Puppy
Subject description: Also known as "dailies"
 

Edit, 2017-08-28:
You'll find a pet archive of the latest version here.


~~~~~~~~~~~~~

Hello all.

As per Flash's suggestion here, I'm opening this thread about daily
backups, aka dailies.

It saw the light of day as an answer to a question by member scientist.

Then I realized that we had nothing like it, and that it is quite a good idea
finally to save the daily bits of your computing every day. And I continued
adding features to it.

Of course, this kind of backup doesn't move mountains, but that's the
idea: to be almost unnoticeable, automatic, and efficient.

If on a particular day, something in your system breaks, you unpack your
latest dailies, copy their contents in your system and you're back in
business in no time.

We have to thank Barry Kauler for his foresight. I'm just making use of the
start / stop feature he designed for Puppys's /etc/init.d directory.

~~~~~~~~

Please note that you still must do, IMO, regular back-ups, by compacting
your pupsave file as a lzop file with SFR's PackIT, every second day, for
example; or whatever means you usually use. "When things go wrong, you
never have enough back-ups." (Old French-Canadian saying.) Wink

Anyway, you can read the genesis, etc., in the other thread. I'm not sure I
mentioned it elsewhere, but this script uses good old zip and the much
newer lzip. The script needs both. And you will too if you ever need to
access the contents! Wink

So... here's the message transfer!

Enjoy ! BFN.

~~~~~~~~~~~~~~~
Hello all.

Time flies, doesn't it?

This is version 3d. It contains a number of improvements, you be the judge.

For one, I changed the licence to GPL3.

An interesting one, I think is a line added to the time tag at line 87 of the
script, to mention which pupsave this daily is for.

It can help dissipate the confusion if you use 2 or 3 pupsaves with the
same Puppy.

The name of the archive is derived from the name of the Pup, contains the
date, and the numbering of the archive (if you make more than one
computer session during the day).

File /root/Daily_zip.note inside the archive now also contains which pupsave
this daily was made for.

IHTH.

Code:
#!/bin/sh
# /etc/init.d/stop_today-files3d # A daily archiving script.
# Requires zip and lzip (both are usually in modern puppies).
#
# This is a twin script of today-files3c.sh, without the checking /
# display part at the end. This script uses instead the test of
# the archive provided by zip itself.
#
# To use: copy this script as < stop_today-files3d > in /etc/init.d/
# and make executable.
#
# You may change the receiving PARTition at line 21 below
# to suit your system.
#
# Comments, usage notes, checking/display section and choice of receiving
# partition in script < today-files3c.sh >  (q.v.) removed for brevity.
#
# (c) Christian L'Écuyer (aka musher0), July 12, 2015.
# Rev.: April 20 & 24-25, May 8 and Aug. 18, 2016, March 15, 2017.
# All rights reserved / Tous droits réservés. GPL3
####
# variables
PuP="`awk -F"'" '$1 ~ /_NAME/ { print $2 }' /etc/DISTRO_SPECS`" # 18 août 2016
PART="home" # Or define your own.
cd /mnt/"${PART}"

# Added 2016-04-20:
DaT="`date '+%Y-%m-%d'`"

# It is now possible to have an unlimited number of archive files.
count="`ls -1 "${PuP}"-"${DaT}"-files*lz | wc -l`"
count="`expr $count + 1`"
FileS="files${count}"
# Useful if you do many sessions on the same day.
#
# Downside: does not create a timed update, grabs all dailies every time,
# because lzip does not have an update command. Also, on the practical level,
# decompressing the lzip file and unzipping and updating the zip archive will
# lenghten the shutdown cycle, which we want to keep as brief as possible.
# You may wish to keep only the highest-numbered archive of the day
# upon later review.
#
# Upside: this limitation may be useful to do some versioning.
# End of edit.

# functions
mklzip () {
lzip -9m64 -f "${PuP}"-"${DaT}"-"${FileS}".zip
}

# unlzip (){
# cd /mnt/"${PART}"
# lzip -d -k "${DaT}"-"${FileS}".zip.lz
# } # Example of how to decompress an lzip file. # Added 2016-04-20.

# Action
# Exception: Skip the "dailies" archiving for the date
# on which an ?drv_*.sfs was created. This is rather for
# developers. The regular user won't need this. But it's
# not an annoyance for anyone. # Added 2016-04-24 & 25.
ModE="`awk -F"=" '/PUPMODE/ { print $2}' /etc/rc.d/PUPSTATE`"
if [ "$ModE" = "12" -o "$ModE" = "13" ];then # Limits
   composante=""
   > /tmp/liste.drv

   for composante in ADRV= FDRV= YDRV= ZDRV=
   do
      DrV="`awk -F"'" '$1 ~ /'$composante'/ { print $2 }' /etc/rc.d/PUPSTATE | awk -F"," '{ print $NF }'`"
      DrV="/mnt/home$DrV"
      [ "${#DrV}" -gt "9" ] && echo "$DrV" >> /tmp/liste.drv
   done
   cat /tmp/liste.drv

   > /tmp/liste.drv1
   for i in `cat /tmp/liste.drv`
   do
      ls --time-style="+%Y-%m-%d" -Algo $i >> /tmp/liste.drv1
   done

   Nombre="`awk '/'"$DaT"'/ { print $NF }' /tmp/liste.drv1 | wc -l`"

   if [ "$Nombre" -gt "0" ];then
      for Fichier in `awk '$4 ~ /'"$DaT"'/ { print $NF }' /tmp/liste.drv1`
      do
         cp -f --backup "$Fichier" "$Fichier".cdr
      done # Si on a installé le jour même, on fait une copie de réserve.
   else # Sinon, on fait la sauvegarde quotidienne ordinaire.
      echo "Daily zip archive / Archive zip quotidienne
For: / Pour : `grep PUPSAVE /etc/rc.d/PUPSTATE`
$DaT, # / n. $count." > /root/Daily_zip.note # Added 2016-04-20, 2017-03-15.
      zip -lf /mnt/"${PART}"/zip.log -la -0 -r -y -FI -t "${DaT}" /mnt/"${PART}"/"${PuP}"-"${DaT}"-"${FileS}" /initrd/pup_rw
# /bin /etc /lib /opt /sbin /root /usr /var
# -x /tmp /dev /sys /initrd /mnt # pas nécessaire
# 2016-04-20: Added < -FI > parameter to include FIFO files.
      if [ ! -d /initrd/pup_rw/root/my-* ];then
         zip -lf /mnt/"${PART}"/zip.log -la -0 -r -u -t "${DaT}" /mnt/"${PART}"/"${PuP}"-"${DaT}"-"${FileS}" /root/my-*
# 2016-05-09
      fi
      touch /mnt/"${PART}"/"${PuP}"-"${DaT}"-"${FileS}".zip
# 2016-05-08 # Essai de correction de l'erreur de date.
      rm -f /root/Daily_zip.note

      mklzip
   fi
fi
## 30 ##
stop_today-files3d.zip
Description  Unzip in /etc/init.d and make executable. Then please move the zip archive
out of /etc to a safe storing place. No extraneous files should be in /etc.
zip

 Download 
Filename  stop_today-files3d.zip 
Filesize  1.99 KB 
Downloaded  39 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Mon 28 Aug 2017, 12:37; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Thu 16 Mar 2017, 22:39    Post subject:  

Just saving the thread from falling into limbo! Wink
_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1424
Location: The other Mr. 305

PostPosted: Fri 17 Mar 2017, 23:31    Post subject:  

Hi Musher0:

I hope you don't mind me adding that for those using Quirky, you should have a 2nd one so if your USB stick fails to boot, you can usually boot a 2nd Quirky and mount the stick that doesn't boot so you can copy things over.

Quirky also has a snapshot manager but I'm pretty sure it won't handle a boot problem.

Anyway, just adding my experiences with Quirky. And thanks for the Puppy backup. I'll need to try it out!
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Fri 17 Mar 2017, 23:55    Post subject:  

Hi slavvo67.

Nice hearing from you.

Having no experience at all of BK's current Quirky, I don't think I'll venture
into the territory. Maybe you could adapt it!

That said, could you explain a little more? Reboot capacity from USB
sounds like an interesting feature, But I'm unclear about how it could (or
should) be done from a daily backup script.

What I mean is:
Let's say, for the sake of example, that you had some kind of failure, You
can then re-boot your Puppy without any pupsave, unpack the most recent
"daily" archive, and repair your pupsave with the files in the "daily", since
the pusave is not active.

But perhaps this is not your meaning? TIA for any pointers.

BFN.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1424
Location: The other Mr. 305

PostPosted: Sat 18 Mar 2017, 00:08    Post subject:  

Ok. Well, Barry's Snapshot Manager basically takes a full snapshot of your Quirky. Assuming you can boot, you can reinstate any of maybe 5 different backups that you created over the course of time.

The thing is, I usually beat up my Quirkies with test files, compiling errors, open ended scripts, etc.... I'm likely to destroy one after the other....until one does not boot anymore. For me, it's just another day at the keyboard...LOL So when they don't boot, I always have another Quirky to pop into the computer and boot up. I never had a problem mounting a USB with a version of Quirky that I blew up. So, it won't boot but it will mount! Then, I can at least transfer my files off and reinstall a fresh Quirky on that stick.

Not sure of your script in Quirky but still, a welcome addition in Puppy for sure!

Hope your well!!

P.S. - Saw a bunch of your Canadian friends in Hollywood Beach, FL a few days back. It's a cool 70 degrees down here right now... Wink
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Sat 18 Mar 2017, 00:18    Post subject:  

You're quite the tease, you know, with your 70 F in Florida -- after the huge
snow storm we had this week! Laughing 2 F here right now!

Best.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Sat 26 Aug 2017, 18:48    Post subject:  

Hello all.

Here is a new version. (Don't forget to remove the old one.)

Only a couple of changes :
1) This version will do nothing if your CMOS battery is dead. Do nothing ?
I hear you laughing... No, guys, I haven't lost a screw!

The importance of this is that the year defaults either to 1980 or to 2002
depending on the age of your BIOS. So the script will want to archive
everything in your Puppy since that year if your CMOS battery is dead.

No harm done, essentially, but it takes a loooong time. If it can't do it all
at shutdown, it will resume the archiving at next boot-up. Lzip is a great
archiver, but because it produces such compact archives, it is slooooww.

Unless one of you suggests a better solution, if the year on your system
is 1980 or 2002, the script wil exit.

If you see NO dailies in /mnt/home for yesterday or for your previous
session, this means that you should go buy a new CMOS battery for your
computer and install it ASAP.

2) New text for claiming my copyright.

What got me thinking about modifying it is the following event:

I was translating a help file the other day, where the dev basically said
the scripts and apps within his distro were under his copyright unless a
previous copyright had been mentioned.

I thought I'd better be safe than sorry. Of course if a dev's real intent is to
steal other people's work, I don't know how efficient these GPL copyright
claims are, but there you go.

Finally, please read the comments in the script below. I think they contain
valuable info and I hate repeating myself!

Have a great day!

BFN.
~~~~~~~~~~~~~
Code:
#!/bin/sh
# /etc/init.d/stop_today-files3e # sub-version 1, with touch-ups to the comments in FR and EN.
# © Christian L'Écuyer, Gatineau (Qc), Canada, 2015. All rights reserved | Tous droits réservés.
# (alias musher0 [forum Puppy]). # Under | Sous GPL3 : https://opensource.org/licenses/GPL-3.0.
#
# Première publication | First release : 2015-07-12, in the Puppy forum | dans le forum Puppy.
# Rév. | Rev. -- 2016 : 04-20, 04-24 & 04-25, 05-08, 08-18; 2017 : 03-15, 08-26.
#
##########
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
##########
#
# English Help--
# A script to archive today's or the session's material.
#
# This is a twin script of today-files3c.sh, without the checking / display part at the end.
# This script uses instead the test of the archive provided by zip itself.
#
# To use: copy this script as < stop_today-files3e > in /etc/init.d/
# and make executable.
#
# You may modify the PART variable (the receiving PARTition) at line 64 below
# to suit your system.
#
# The comments and usage notes, the checking and display section and the choice
# of receiving partition were removed from script < today-files3c.sh >  (q.v.) to
# make this one shorter.
#
##########
#
# Aide en français --
# Un script pour archiver le matériel du jour ou de la session.
#
# Ce script est le jumeau de today-files3c.sh, sans la partie de vérification et d'affichage
# à la fin. Ce script-ci utilise en lieu et place le test d'archive fourni par l'utilitaire zip.
#
# Pour l'utiliser -- Le copier sous le nom < stop_today-files3e > dans /etc/init.d/
# et le rendre exécutable.
#
# Vous pouvez modifier la variable PART (la partition de réception) à la ligne 64
# ci-dessous pour l'adapter à votre système.
#
# Les observations et notes sur l'utilisation, la section de vérification et d'affichage,
# ainsi que le choix de la partition de réception du script < today-files3c.sh >  (q.v.)
# ont été retirés afin de raccourcir le présent script.
#
##########

# variables
PuP="`awk -F"'" '$1 ~ /_NAME/ { print $2 }' /etc/DISTRO_SPECS`" # 18 août 2016
PART="home" # Or define your own.
cd /mnt/"${PART}"
#

# Added / Ajout
if [ "`date '+%Y'`" = "1980" -o "`date '+%Y'`" = "2002" ];then exit # 2017-08-26
#####
# Français --
# Dates les plus probables si la batterie du CMOS est défunte. Autrement, le script
# archivera tout depuis l'une ou l'autre de ces dates.
###
# English --
# Most probable dates if the CMOS battery has died. Otherwise, the script will
# archive everything since one or the other of those dates.
#####
else DaT="`date '+%Y-%m-%d'`" # 2016-04-20
fi # Si la date est erronée, on passe. | If the date is wrong, we pass.
#
# It is now possible to have an unlimited number of archive files. |
# Il est maintenant possible d'avoir un nombre illimité d'archives.
count="`ls -1 "${PuP}"-"${DaT}"-files*lz | wc -l`"
count="`expr $count + 1`"
FileS="files${count}"
#

#############
# English -- # Useful if you do many sessions on the same day. /
#
# Downsides: does not create a timed update; grabs all dailies every time,
# because lzip does not have an update command.
#
# Also, on the practical level, decompressing the *.lz file, and the unzipping and
# updating the zip archive would considerably lenghten the shutdown cycle,
# which we want as brief as possible.
#
# For those reasons, you may wish to keep only the highest-numbered archive
# upon later review.
#
# Upside: this limitation may prove to be a plus in the context of a versioning
# check for some script or application.
#
#############
# Français -- # Utile si vous faites plusieurs sessions le même jour.
#
#Inconvénients : ne crée pas de mise à jour à heure fixe; ramasse tous les fichiers
# du jour chaque fois, parce que lzip n'a pas de commande pour la mise à jour.
#
# Aussi, au niveau pratique, la décompression du fichier *.lz, le dézippage et la
# mise à jour de l'archive zip allongeraient considérablement le cycle de fermeture
# de l'ordinateur, que nous voulons aussi bref que possible.
#
# Avantage : cette limite peut s'avérer un plus dans le cadre d'une vérification
# de version pour tel ou tel script ou application.
#
#############

# functions
mklzip () {
lzip -9m64 -f "${PuP}"-"${DaT}"-"${FileS}".zip
}

############# Reminder | Rappel
# To unpack an lzip archive: | Pour déballer une archive lz :
# unlzip (){
# cd /mnt/"${PART}"
# lzip -d -k "${DaT}"-"${FileS}".zip.lz
# }
# Example of how to decompress an lzip file. # 2016-04-20. #
# Exemple de la façon de décomprimer un fichier lzip.
#############

# Action
############# 2016-04-24 & 25.
# English --
# Exception: Skip the "dailies" archiving for the date on which an ?drv_*.sfs
# was created. This is rather for developers. The regular user won't need this.
# But it's not an annoyance for anyone.
#############
# Français --
# Exception : Ne pas archiver de fichiers du jour le jour où un fichier ?drv_*.sfs
# a été créé . Cela est plutôt pour les développeurs, puisque l'utilisateur
# ordinaire n'en a pas besoin. Mais ce n'est un agacement pour personne.
#############

ModE="`awk -F"=" '/PUPMODE/ { print $2}' /etc/rc.d/PUPSTATE`"
if [ "$ModE" = "12" -o "$ModE" = "13" ];then # Limits
   composante=""
   > /tmp/liste.drv

   for composante in ADRV= FDRV= YDRV= ZDRV=
   do
      DrV="`awk -F"'" '$1 ~ /'$composante'/ { print $2 }' /etc/rc.d/PUPSTATE | awk -F"," '{ print $NF }'`"
      DrV="/mnt/home$DrV"
      [ "${#DrV}" -gt "9" ] && echo "$DrV" >> /tmp/liste.drv
   done
   cat /tmp/liste.drv

   > /tmp/liste.drv1
   for i in `cat /tmp/liste.drv`
   do
      ls --time-style="+%Y-%m-%d" -Algo $i >> /tmp/liste.drv1
   done

   Nombre="`awk '/'"$DaT"'/ { print $NF }' /tmp/liste.drv1 | wc -l`"

   if [ "$Nombre" -gt "0" ];then
      for Fichier in `awk '$4 ~ /'"$DaT"'/ { print $NF }' /tmp/liste.drv1`
      do
         cp -f --backup "$Fichier" "$Fichier".cdr
      done # Si on a installé le jour même, on fait une copie de réserve. |
# If we have installed on this day, we make a back-up.
   else # Sinon, on fait la sauvegarde quotidienne ordinaire.
# Otherwise, we do the usual daily save.

      echo "Daily zip archive / Archive zip quotidienne
For: / Pour : `grep PUPSAVE /etc/rc.d/PUPSTATE`
$DaT, # / n. $count." > /root/Daily_zip.note # Added 2016-04-20, 2017-03-15.
      zip -lf /mnt/"${PART}"/zip.log -la -0 -r -y -FI -t "${DaT}" /mnt/"${PART}"/"${PuP}"-"${DaT}"-"${FileS}" /initrd/pup_rw
# /bin /etc /lib /opt /sbin /root /usr /var
# -x /tmp /dev /sys /initrd /mnt # Pas nécessaire / Unnecessary
# 2016-04-20: Added < -FI > parameter to include FIFO files.
      if [ ! -d /initrd/pup_rw/root/my-* ];then
         zip -lf /mnt/"${PART}"/zip.log -la -0 -r -u -t "${DaT}" /mnt/"${PART}"/"${PuP}"-"${DaT}"-"${FileS}" /root/my-*
# 2016-05-09
      fi
      touch /mnt/"${PART}"/"${PuP}"-"${DaT}"-"${FileS}".zip
# 2016-05-08 # Essai de correction de l'erreur de date. / Attempt at correcting the date error.
      rm -f /root/Daily_zip.note
      mklzip
   fi
fi
## 30 ##
stop_today-files3e.zip
Description  Unzip in /etc/init.d and make executable. Then move the zip archive to a
safe place; there should be no extraneous files in /etc.
zip

 Download 
Filename  stop_today-files3e.zip 
Filesize  3.42 KB 
Downloaded  18 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Sun 27 Aug 2017, 01:26; edited 1 time in total
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9378
Location: Charleston S.C. USA

PostPosted: Sat 26 Aug 2017, 19:36    Post subject:  

Why not offer this as a pet package to install it?

It is small enough to post in the forum as a pet.

Also, it would make sure it got installed to the correct location.

Thanks for the code!!

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Sun 27 Aug 2017, 01:19    Post subject:  

Hi bigpup.

Finally someone asked !!! Wink

My pleasure. Here you go. (Attached)

Have a great day!
dailies-3.pet
Description 
pet

 Download 
Filename  dailies-3.pet 
Filesize  3.81 KB 
Downloaded  22 Time(s) 

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9378
Location: Charleston S.C. USA

PostPosted: Sun 27 Aug 2017, 08:27    Post subject:  

Thanks for the pet!!!

Should offer the pet in the first post of the topic or a link to it.

Makes it easy to find!

You like easy to find, don't you Laughing

We are people, we want it easy Shocked Laughing

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9378
Location: Charleston S.C. USA

PostPosted: Sun 27 Aug 2017, 08:43    Post subject:  

Could you explain what this is trying to tell me?

Quote:
/mnt/home/tahr64606uefi/zdrv_tahr64_6.0.6.sfs
adding: initrd/pup_rw (stored 0%)
Script completed hit RETURN to close window.


I had to install Lzip to get this working.
Well, I think it is working.
I got Lzip from Puppy PPM.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Sun 27 Aug 2017, 22:03    Post subject:  

bigpup wrote:
Could you explain what this is trying to tell me?
Quote:
/mnt/home/tahr64606uefi/zdrv_tahr64_6.0.6.sfs
adding: initrd/pup_rw (stored 0%)
Script completed hit RETURN to close window.

I had to install Lzip to get this working.
Well, I think it is working.
I got Lzip from Puppy PPM.

Hi bigpup.

Yeah, you're supposed to have lzip installed to run this script, that's why
the "dailies" are so small and compact. Sorry for the inconvenience, I
thought I had mentioned the lzip requirement in the initial presentation.

The script asks zip to check for files with today's date in /initrd/pup_rw and
to store them in a zip archive. The "stored 0%" message comes from zip.

In the "dailies", two archivers are at work:
1) zip is used first because it has lots of parameters for selection of files,
detection of file time and file type, etc.

But I'm asking zip to just gather the files in an uncompressed "container",
That's where the "stored 0%" message comes from. At this point, zip has
put your daily files in a container; like a copy, but in a single container --
the zip archive.

2) Once zip has created this container, lzip goes to work and does the
actual compression, at maximum level. Even < zip -9 > can't compress
this much.

On the other hand, lzip can't select files, and it only knows to compress
one file at a time. Both archivers have their limits, as you can see, but
together they're win-win. (IMO)

It's similar to the tar and gz combination, or tar and xz combination, except
zip and lzip are used. (The "deep-deep" reason is that I know zip and lzip
better than I know tar and xz, and I'm basically a lazy person: I didn't want
to have to re-learn tar and xz.) Cool

~~~~~~~~

To check if it's working, look in /mnt/home to see if you have a *.zip.lz file
named something like this:
Quote:
Dpup Stretch-2017-08-27-files1.zip.lz
Meanings:

First part: the < Name of your Puppy >

Second part: < today's date >

Third part: < "files1" means "first series of files for the day" >
if this was your second session today after installing the dailies script it
would be < files2 = "second series of files for the day" > and so on.

Fourth and last part: the archive types: zip.lz means "this file is an
lzipped zip archive."

~~~~~~~~~

I hope the above answers the various aspects of your question. I'll give you
more details if you need any.

BFN.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Sun 27 Aug 2017, 22:38; edited 1 time in total
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9378
Location: Charleston S.C. USA

PostPosted: Sun 27 Aug 2017, 22:32    Post subject:  

Thank you for the info!

I just wanted to make sure it is working 100%.

I understand!

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10946
Location: Gatineau (Qc), Canada

PostPosted: Sun 27 Aug 2017, 22:39    Post subject:  

My pleasure! Smile
_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


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

PostPosted: Mon 28 Aug 2017, 10:26    Post subject:  

If anyone is worried about ransomware making their backups unusable, saving the compressed backup files as sessions on a multisession DVD or Blu-ray disk (not necessarily a multisession Puppy disk, though that would work even better) would make it impossible to encrypt the file after it has been written to the disk.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [18 Posts]   Goto page: 1, 2 Next
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.1767s ][ Queries: 12 (0.0046s) ][ GZIP on ]