How To Recover a save.dat File from a Session Module?

Technical issues/questions of an intermediate or advanced nature.
igreka
White ninja
White ninja
Posts: 29
Joined: 05 Oct 2014, 21:48
Distribution: porteus 3
Location: lincoln

How To Recover a save.dat File from a Session Module?

Post#1 by igreka » 24 Jul 2016, 00:14

Hi you all,

After the unfortunate crash I suffered from last month, I have become quite paranoid with my new install.

I have set up the system to boot with changes save on exit to a save.dat.xzm file. This worked great until it started to know error messages on boot like "cp: cannot stat yaddi yadda...". Sadly, the boot screen changes too fast for me to snap it or something.

Nonetheless, the state of the system I inherit from this is useless. I think it has to do with the download and installation of the heroku toolbelt. :cry:

Fortunately [because I am now paranoid], I have saved sessions as modules to serve as recovery points after every important steps of my configuration/package-installation process.

So I have a session module 'changes-160723.xzm'. Loading great. Now I want it to be some sort of recovery point and want my save.dat.xzm to pick up from that module.

Renaming that session module to save.dat.xzm doesn't seem to work BTW.

Looking forward to your always-enlightening inputs. Thanks.

User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: How To Recover a save.dat File from a Session Module?

Post#2 by Ed_P » 24 Jul 2016, 02:18

igreka wrote:I have set up the system to boot with changes save on exit to a save.dat.xzm file.
Really!! :shock: I wasn't aware that changes=EXIT would work with a non-.dat file.
This worked great until it started to know error messages on boot like "cp: cannot stat yaddi yadda...". Sadly, the boot screen changes too fast for me to snap it or something.
A trick I use to catch boot errors is to add a 3 to my boot options.

Code: Select all

changes=EXIT:/porteus3.0/changes/porteussave.dat volume=40 reboot=cold ramsize=80%   3
This stops system from booting to the GUI desktop.

Nonetheless, the state of the system I inherit from this is useless. I think it has to do with the download and installation of the heroku toolbelt. :cry:
So I have a session module 'changes-160723.xzm'. Loading great. Now I want it to be some sort of recovery point and want my save.dat.xzm to pickup from that module.
If you create a new save.dat file and use it to boot together with your changes xzm module I think it will pick up from that module. (Not knowing how your changes module is created.)


BTW A thought I had recently for creating a changes module was to create the module using the contents of the /mnt/live/memory/changes folder. Haven't tried it, just a thought.
Ed

igreka
White ninja
White ninja
Posts: 29
Joined: 05 Oct 2014, 21:48
Distribution: porteus 3
Location: lincoln

Re: How To Recover a save.dat File from a Session Module?

Post#3 by igreka » 24 Jul 2016, 12:55

Really!! :shock: I wasn't aware that changes=EXIT would work with a non-.dat file.
Well, I took a regular save.dat file and appended '.xzm' to the filename and moved it to the porteus/modules folder. It seemed this approach served its purpose of recording changes to the system. However, I can't say if it was sound to do so.
If you create a new save.dat file and use it to boot together with your changes xzm module I think it will pick up from that module. (Not knowing how your changes module is created.)
I tested that hypothesis to no avail as so:
1. Start in AF mode;
2. Create brand new save.dat file;
3. Touch 'testing' empty file to /home/guest/Desktop;
4. Save session to /porteus/optional/sessions; <---- I created that subfolder initially to save all my... sessions 8)
5. Reboot in AF mode with changes=EXIT:/path/to/save.dat load=sessions/session_file;
Note that at this point, the empty 'testing' is there safe and sound.
6. Touch 'testing2' next to poor lonely 'testing';
7. Reboot with the 'changes' and without the 'load' cheat codes;
Result: 'testing2' is now seating there all alone.

My take is that the 'changes=' cheat code only record changes to the filesystem made from and after the point where it was enabled. Thus it disregards all the previous changes recorded by the session file.

So I guess I cannot use sessions as recovery points unless I always want to use the 'load=' cheat code in which case what would be the point of using 'changes=' in the first place?! right?

Maybe a smarter approach would be to use 'save-changes /path/to/new_save_file' and then rename that file to 'save.dat' whenever I need to recover back that 'state/point in time'. I tried that with a session module and my 'save.dat.xzm': it fell miserably. I going :%)

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: How To Recover a save.dat File from a Session Module?

Post#4 by Bogomips » 24 Jul 2016, 14:36

igreka wrote:Well, I took a regular save.dat file and appended '.xzm' to the filename and moved it to the porteus/modules folder. It seemed this approach served its purpose of recording changes to the system. However, I can't say if it was sound to do so.
igreka wrote:Maybe a smarter approach would be to use 'save-changes /path/to/new_save_file' and then rename that file to 'save.dat' whenever I need to recover back that 'state/point in time'. I tried that with a session module and my 'save.dat.xzm': it fell miserably.
Should have been in modules folder?

See DAT entry here http://forum.porteus.org/viewtopic.php? ... 069#p47320
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply