Made a simple clickable script to backup/restore pupsave in /mnt/home.
Remove the first two lines if you want to run in Prompt.
The backups are store only by date, so if you backup the same pupsave twice in a day, it will overwrite.
Code:
#!/bin/sh
tail -n +4 $0 > /tmp/backupscript.txt
exec rxvt -e sh /tmp/backupscript.txt
DATE=`date +%e-%m-%y`
if [ -f /tmp/PUPSAVE ]
then
rm /tmp/PUPSAVE
fi
echo "[r]estore or [b]ackup"
read RB
echo Choose which BackUp you would like to Restore.
CHOOSE=1
for ONECHOICE in `cat /tmp/PUPSAVE | tr '\n' ' '`
do
ONEPART="`echo -n "$ONECHOICE" | cut -f 1 -d ','`"
echo -e "${CHOOSE} ${ONEPART}"
CHOOSE=`expr $CHOOSE + 1`
done
read SAVENUM
PUPSAVE="`cat /tmp/PUPSAVE | tr '\n' ' ' | cut -f $SAVENUM -d ' '`"
NAME="${PUPSAVE%/*}"
NAME="${NAME%???}.${NAME:${#NAME}-3}"
echo $NAME
echo Are you sure? This will remove the previous Savefile. [y/n]
read sureornot
if [ "$sureornot" = n ];then
echo Goodbye
read
fi
if [ "$sureornot" = y ];then
echo removing $NAME
rm $NAME
echo Copying $PUPSAVE to $NAME...Auto-close when done.
cp -p "$PUPSAVE" "$NAME"
fi
fi
r1tz: This is a very interesting script! Could be interesting to expand it to only save what was added/changed since last save/backup (like done in the save to multi-session-cd) to save space and to do this automatic at shutdown. Maybe a setting for how many backups should be kept?
This would have spared me from totally messing up a save-file by doing wrong installs many times.
Like a roll-back opportunity if something goes wrong...
I am already using a well done script I got from the forum called pupsave-backup.
It goes a step further by doing a file system check on the backed up pupsave.
Also, the pupsave backup is made with date and time as part of the filename.
It has saved me a few times.
I am already using a well done script I got from the forum called pupsave-backup.
Any chance to point me to that script? Can't find it searching the forum...
You can normally revive a broken savefile using the "purge" boot options from the Puppy CD - but then you need to find the cd and it revert more or less to scratch.
Ok, sorry.
I got the name wrong.
It is called hotbackup and a search of the forum will bring it up.
You can save the backup to any media you have and it does not have to be on the same drive.
It is only made for frugal installs though.
As to incremental backups, one might check out Snap2. It is supposed to make backups that only save changes made.
But be sure to read the documentation for it!
Rules_post_cannot Rules_reply_cannot Rules_edit_cannot Rules_delete_cannot Rules_vote_cannot You cannot attach files in this forum You can download files in this forum