The Portable Save Folder - idea for shutdown script.

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
geo_c
Posts: 2878
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2200 times
Been thanked: 873 times

The Portable Save Folder - idea for shutdown script.

Post by geo_c »

I'll post here, but it might be better located somewhere else in the forum:

I use multiple laptops daily. I have found that puppy has very little problems with booting a backup save folder on a new machine. The hardware profiles are smoothly changed, and therefore puppy is a true portable system in that sense.

My procedure looks like this:

  • Work on machine (A) and backup the savefolder to a USB hard drive with a puppy install. The USB hard drive then contains a running Pup with savefolder (A).BKP-timestampEARLIER

  • Rename backed-up USB savefolder (A).BKP-timestampEARLIER to (A).BKP-EARLIER-shorterSTAMP

  • Shutdown machine (A)

  • Bootup machine (B)

  • Copy (A).BKP-EARLIER-shorterSTAMP from USB hard drive to machine (B)

  • Reboot machine (B) and choose (A).BKP-EARLIER-shorterSTAMP as the working OS

  • Immediately backup (A).BKP-EARLIER-shorterSTAMP on machine (B)

  • Use the system

  • On shutdown backup savefolder to machine (B) and the USB hard drive as (B).BKP-timestampLATER

  • Repeat the process when returning to machine (A)

Works smoothly and I've always had a fall back savefolder in case I break something, and all my machines are running the same savefolder ultimately, HOWEVER, the only thing that is tricky occurs in knowing what the last time I accessed a particular savefolder with a particular timestamp might be. For instance if I ran the system from the USB drive since it was stamped a certain way.

MY QUESTION/IDEA: what if I added a line to the shutdown script, or added a script to include a simple marker file on the same directory as the save folder with the name of the save, and a last accessed timestamp.

I realize with the newer systems being developed like KLV-Airedale, this a moot suggestion most likely.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2878
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2200 times
Been thanked: 873 times

Re: The Portable Save Folder - idea for shutdown script.

Post by geo_c »

so I came up with this:

Code: Select all

#!/bin/sh

DATE=$(date +"%m%d.%H%M")
cp /root/fossapup64save-DPi7.log /mnt/home/fossapup64/fossapup64save-DPi71-$DATE.log
echo program

That backup pupsave is my fossapup install on a Dell Precision i7, (DPi7)

I backup the pupsave, rename it erasing the "bkp-Date" and replacing it with "1" tacked on the end. and then run this script. If I happen to boot into that save (DPi71) at some point, I run the script at shut down. I also run the script when I shutdown main pupsave (DPi7). That way I always know the last time a pupsave was used and shutdown.

I'm sure there's probably a better to do it. But this works.

Last edited by geo_c on Mon May 02, 2022 3:39 am, edited 2 times in total.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2878
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2200 times
Been thanked: 873 times

Re: The Portable Save Folder - idea for shutdown script.

Post by geo_c »

Updated it to this, so I can copy the scripts into the install directory and run them and drop a log file.

Code: Select all

#!/bin/sh

MYDIR=$(cd `dirname $0` && pwd)
cd $MYDIR

DATE=$(date +"%m%d.%H%M")
cp /root/fossapup64save-DPi7.log $MYDIR/fossapup64save-DPi71-$DATE.log
echo program

geo_c
Old School Hipster, and Such

Post Reply

Return to “Users”