Backing Up save.dat in Copy Agent

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Backing Up save.dat in Copy Agent

Post#1 by jimwg » 29 Dec 2013, 15:04

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

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Backing Up save.dat in Copy Agent

Post#2 by jimwg » 29 Dec 2013, 20:57

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

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Backing Up save.dat in Copy Agent

Post#3 by fanthom » 29 Dec 2013, 22:00

"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.
Please add [Solved] to your thread title if the solution was found.

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Backing Up save.dat in Copy Agent

Post#4 by jimwg » 29 Dec 2013, 22:22

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

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Backing Up save.dat in Copy Agent

Post#5 by fanthom » 01 Jan 2014, 05:43

@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.
Please add [Solved] to your thread title if the solution was found.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Backing Up save.dat in Copy Agent

Post#6 by brokenman » 05 Jan 2014, 02:59

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Backing Up save.dat in Copy Agent

Post#7 by tome » 06 Jan 2014, 21:45

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.
You have mind and feelings. Be wise and clever.

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Backing Up save.dat in Copy Agent

Post#8 by jimwg » 13 Jan 2014, 20:37

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

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Backing Up save.dat in Copy Agent

Post#9 by tome » 14 Jan 2014, 23:07

@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.
You have mind and feelings. Be wise and clever.

jimwg
Shogun
Shogun
Posts: 322
Joined: 09 Oct 2013, 18:15
Distribution: porteus
Location: NYC

Re: Backing Up save.dat in Copy Agent

Post#10 by jimwg » 17 Jan 2014, 13:31

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

tome
Contributor
Contributor
Posts: 675
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Russia is causing the immense damage to humanity
Contact:

Re: Backing Up save.dat in Copy Agent

Post#11 by tome » 19 Jan 2014, 18:09

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.
You have mind and feelings. Be wise and clever.

Post Reply