Page 1 of 1

Backing Up save.dat in Copy Agent

Posted: 29 Dec 2013, 15:04
by jimwg
Seasons Greetings!

I'd like to know whether Porteus has any issues preventing you from moving/copying your save.dat file to your Copy Agent folder to so be automatically backed-up to the Copy cloud. Some Puppy mavens said if Porteus occasionally auto-saves its save file like Puppy does that it could pose a problem during uploads. Is this issue a show-stopper?

Jim in NYC

Re: Backing Up save.dat in Copy Agent

Posted: 29 Dec 2013, 20:24
by phhpro
...

Re: Backing Up save.dat in Copy Agent

Posted: 29 Dec 2013, 20:57
by jimwg
phhpro wrote:While I don't use it myself, I figure it's possible to set a save frequency; lets say, every 30 minutes or on the hour. Then add a cron job to cp your fresh save.dat into the copy folder. Transfering open streams (while being written to) will almost certainly result in corrupted data.
Thanks for replying! Is there such a way to regulate or stop a save writing process in Porteus to allow a full uninterrupted Copy upload? There's a way in Puppy but I've gone thru the Porteus control panels and can't find a way.

Jim in NYC

Re: Backing Up save.dat in Copy Agent

Posted: 29 Dec 2013, 22:00
by fanthom
"Is there such a way to regulate or stop a save writing process in Porteus to allow a full uninterrupted Copy upload?"
you could use 'changes=EXIT:' cheatcode and 'dump-session' script:
- changes=EXIT: delays writing current session till the shutdown (it makes safe to upload save.dat to the cloud)
- 'dump-session' let's you save your current session to save.dat in this very moment

all what you need to do is to add 'EXIT:' extension to your 'changes=' cheatcode and create cron job which will run 'dump-session' command and upload save.dat to the cloud.

Re: Backing Up save.dat in Copy Agent

Posted: 29 Dec 2013, 22:22
by jimwg
fanthom wrote:"Is there such a way to regulate or stop a save writing process in Porteus to allow a full uninterrupted Copy upload?"
you could use 'changes=EXIT:' cheatcode and 'dump-session' script:
- changes=EXIT: delays writing current session till the shutdown (it makes safe to upload save.dat to the cloud)
- 'dump-session' let's you save your current session to save.dat in this very moment

all what you need to do is to add 'EXIT:' extension to your 'changes=' cheatcode and create cron job which will run 'dump-session' command and upload save.dat to the cloud.
Thanks for swift reply!

Just to be safe, this is how your suggestion should look?:

LABEL XFCE RAM
MENU LABEL XFCE RAM ROOT BOOT
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus/changes/porteussave2.dat fsck load=xfce copy2ram login=root
changes=EXIT:'
'dump-session' script:
TEXT HELP
Run Porteus the same as above,
but first copy all data to RAM
to get a huge speed increase
(needs >512MB)
ENDTEXT


Just a newbie playing it by ear!
Jim in NYC

Re: Backing Up save.dat in Copy Agent

Posted: 29 Dec 2013, 22:39
by phhpro
...

Re: Backing Up save.dat in Copy Agent

Posted: 01 Jan 2014, 05:43
by fanthom
@phhpro
I may be wrong, but doesn't your solution suggest the save operation upon logging out?
it doesnt because OP will be using 'dump-session' script which saves session on a request so once again:
cron job starts a script which periodically which runs 'dump-session' then makes a backup of updated save.dat (upload to the cloud, copy to another partition, etc..)

@jimwg
your APPEND should look like here:

Code: Select all

APPEND initrd=initrd.xz changes=EXIT:/porteus/changes/porteussave2.dat fsck load=xfce copy2ram login=root
please read /boot/docs/cheatcodes.txt carefully.

now create simple script and cron job as described here:
http://www.linuxquestions.org/questions ... 175468865/
or on many other HOWTOs which you can find on google.

Re: Backing Up save.dat in Copy Agent

Posted: 05 Jan 2014, 02:59
by brokenman
Why not just change the 'Copy Agent' default folder to /mnt/live/memory/changes/ and have it exclude folder you don't want uploaded?
This way when any change is made it will be moved to the online storage when your copy agent syncs. I havn't tried this but considered doing it with dropbox just for fun. It sounds much easier than organizing the cron jobs client side.

Re: Backing Up save.dat in Copy Agent

Posted: 06 Jan 2014, 20:55
by phhpro
...

Re: Backing Up save.dat in Copy Agent

Posted: 06 Jan 2014, 21:45
by tome
Does 'Copy Agent' honour file permissions and symlinks?
There is no 'sync' Copy Agent -> host, always host sends data to Copy Agent for one PC and one current profile (if time is correct for both - always data on host is newer or the same). Problem can be for more than one PC or for Summer time - adjusting clock.

Re: Backing Up save.dat in Copy Agent

Posted: 07 Jan 2014, 03:21
by phhpro
...

Re: Backing Up save.dat in Copy Agent

Posted: 13 Jan 2014, 20:37
by jimwg
So would it be safe to transplant your Seamonkey folder out of .mozilla and into a Copy folder and link it back to .mozilla with an alias for a constant Mail backup or is it always too active for CopyAgent to safely sync with?

Jim in NYC

Re: Backing Up save.dat in Copy Agent

Posted: 14 Jan 2014, 23:07
by tome
@jimwg
Yes and no.
You don't need transplant Seamonkey - only make link to this in your Copy Agent folder but it is not classic backup - your 'backup' is actual copy (synchronizing) of Seamonkey so if you delete or corrupt something - it will be deleted (corrupted) on your remote copy (I don't know if Copy Agent "moves" to Trash deleted files for potential restoring but even if it support Trash restoring many files can be difficult). If you want have true backup you should transplant Seamonkey time and again and add for every copy new name (date of backup) or synchronize only if you are sure your Seamonkey files are correct and not opened by any program. Permissions are lost but it doesn't matter in this case.

Re: Backing Up save.dat in Copy Agent

Posted: 17 Jan 2014, 13:31
by jimwg
Copy's menu on panel bar has fonts that appear "ghosted" or "embossed" and hard to see even though it's fully functional on Porteus 3.0, yet fonts and display of other menus on bar appear normal. I used the custom Porteus Copy app here to create the Copy menu here rather than the Linux one on the Copy site so could that be the reason? Is there a way to alter its font rendering? Thanks!

Jinm in NYC

Re: Backing Up save.dat in Copy Agent

Posted: 19 Jan 2014, 18:09
by tome
Too much complicated/customized by you so only you can find (by testing/trying) the best answer/solution. You can add picture here to see what's exactly wrong.