Page 1 of 1

Timing Your Own Auto-Save To Flash

Posted: 17 Jan 2014, 13:37
by jimwg
Greetings;

I think it's little obscure if there's a method, but how do you set your own time period for Porteus to auto save/back-up data in RAM to your flash?

Thanks

Jim in NYC

Re: Timing Your Own Auto-Save To Flash

Posted: 17 Jan 2014, 15:59
by brokenman
From the cheatcodes.txt file:
While you are running a session with changes=EXIT, you can use the
'dump-session' command (run as root from the command line) to move all
of your changes from RAM to your storage media. This will reduce the
risk of data loss and free up your RAM.
So you may use whatever method you prefer to run the command dump-session at your chosen interval.

You may use cron by creating a file /etc/cron.d/dumpmysession with the following.

Code: Select all

*/15 * * * * DISPLAY=:0.0 dump-session >/dev/null
This will dump your session every 15 minutes.

Or by placing somescript like this in your startup:

Code: Select all

let counter=$counter+1
if [ $counter == 600 ]; then /usr/bin/dump-session; $counter=0; fi
Lastly my choice would be a keyboard shortcut (differs per DE) to run the command: dump-session (This would require a password if running as guest)

EDIT: This is how i handle the stopping of cronjobs on my home machine:
ps -o pid,sess,cmd afx | grep -A20 "cron$"
Then look for the PID (first column of output) and issue:
pkill -s (PID of your cronjob)

Re: Timing Your Own Auto-Save To Flash

Posted: 18 Jan 2014, 11:54
by jimwg
Thanks for all the recommendations! The only thing is I'm a "seasoned newbie" thanks to your guys and my Amiga past. What about the "newbie-newbie" taking a taste of Porteus and at risk of being put-off by techie-tinkkering to get something done? Is it possible to create a "Cheatcode GUI" or script builder function template akin to the Porteus Settings Center System settings for Time configuration to look and act less techie and more newbie friendly?

Thanks!

Jim in NYC

Re: Timing Your Own Auto-Save To Flash

Posted: 18 Jan 2014, 13:01
by brokenman
Of course something can be added to a GUI. Your question did not sound like a feature request and therefore i answered with the simplest method known using the tools available.

There are various linux cron job creators with a gui available. Even one for slackware. It shouldn't be too difficult to add something to PSC so i will put it on the TODO list. For now you can create your own cronjobs here:
http://www.corntab.com/pages/crontab-gui and then open a terminal and su to root:

Code: Select all

su
toor
crontab -e
Now you need to paste your command created from the site above into the crontab (the terminal screen). This will depend on the terminal that you are using but probably holding down 'ctrl' and 'shift' together and then hitting 'v' should do it.

PS: I am currently working on an easier way for users to build packages from a .SlackBuild file on Porteus.

Re: Timing Your Own Auto-Save To Flash

Posted: 19 Jan 2014, 00:21
by jimwg
brokenman wrote:Of course something can be added to a GUI. Your question did not sound like a feature request and therefore i answered with the simplest method known using the tools available.

There are various linux cron job creators with a gui available. Even one for slackware. It shouldn't be too difficult to add something to PSC so i will put it on the TODO list. For now you can create your own cronjobs here:
http://www.corntab.com/pages/crontab-gui and then open a terminal and su to root:

Code: Select all

su
toor
crontab -e
Now you need to paste your command created from the site above into the crontab (the terminal screen). This will depend on the terminal that you are using but probably holding down 'ctrl' and 'shift' together and then hitting 'v' should do it.

PS: I am currently working on an easier way for users to build packages from a .SlackBuild file on Porteus.
Thanks! So great to know that you're already on top of the need! Thanks! :)

Jim in NYC