Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 25 Oct 2014, 00:15
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Another way to restore Hot Backup files.(abandoned)
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
rhadon


Joined: 27 Mar 2008
Posts: 1293
Location: Germany

PostPosted: Sat 17 Dec 2011, 10:57    Post_subject:  Another way to restore Hot Backup files.(abandoned)  

Hi,

I'm working on a way to restore backup files from 2byte's Pupsave Hot Backup without using pfix=ram. Till now only tested (and working) with hd and Slacko 5.3.

You boot a BKP file and at the end you can choose whether you want to save back to the BKP file, to restore the BKP file to the default partition without the BKP part or both, save and restore, or leave everything as it was before booting.

The main limitation, the BKP files must be on the same drive as Slacko, but on another partition.

It has advantages and I think it's useful, but sometimes I also think, it's too complex.

What do you think? Is it worth to investigate time in this project or is it too complicate?

My test bed: Slacko on sda2/slacko-5.3, BKP files on sda7/slacko-5.3. Both folders must have the same name.

By now I use a patched version of Hot Backup which creates file names like "slackosave.BKP111216-08.20.3fs".

To use or to run a BKP file I use pfix=ataflash instead of pfix=atahd and added psavemark=7 (7 because it's sda7 for me).

Now I'm able to test. Is the BKP file the one I want, or do I need another BKP file?

At the end of testing I can choose as described before.

Here is the way:

1) Run Slacko 5.3

2) Install PupsaveHotBackup-1.3-test.pet (it's OK for 2byte that I 'abuse' his wonderful program, Thank You)

3) Download alsa_snapmergepuppy-20111210-shinobar.tar.gz, extract it and replace /usr/sbin/snapmergepuppy. This is because the original one can cause problems, sometimes not erverything will be saved at the end.

4) Download rc.shutdown-20111217-rhadon.tar.gz, extract it and replace /ect/rc.d/rc.shutdown.

5) Change menu->System->Puppy Event Manager->Save Session->Save interval to "0"

At next reboot you have access to your BKP files by using pfix=ataflash and psavemark=[number_of_the_BKP_partition].

Is it too complex?

Hints, recommendations or feedback is really appreciated Wink .

Also, if anybody thinks that the idea is good, but my code is lousy, your'e probably right. It's OK for me, if somebody says 'I can do it better and I will do'.

Have a nice time,
Rolf

alsa_snapmergepuppy-20111210-shinobar.tar.gz can be found here.
restore_01.png
 Description   
 Filesize   4.51 KB
 Viewed   1025 Time(s)

restore_01.png

rc.shutdown-20111217-rhadon.tar.gz
Description 
gz

 Download 
Filename  rc.shutdown-20111217-rhadon.tar.gz 
Filesize  9.3 KB 
Downloaded  194 Time(s) 
PupsaveHotBackup-1.3-test.pet
Description 
pet

 Download 
Filename  PupsaveHotBackup-1.3-test.pet 
Filesize  4.47 KB 
Downloaded  188 Time(s) 

_________________
Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.

Edited_time_total
Back to top
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3462
Location: West Lothian, Scotland, UK

PostPosted: Sat 17 Dec 2011, 12:16    Post_subject:  

1. WOW! You're making my dreams come true! Very Happy Cool
While I can only dream of stuff like this, you are making it real!

2. This is definitely worth investing time and effort, and I shall do so.

3. The limitation of needing to have the BKP files on the same_drive_different_partition as the...what? The pupsave file?...
Will cause me difficulty, because I'll need to transfer [or copy and delete the originals of] all my pupsave files from their 10GB internal HDD, to something bigger, then swap drives.
[I have a spare 80GB HDD lying around somewhere.]

4. I'm having some difficulty understanding exactly the significance of the various shut-down choices available.
Here's my understanding so far:
e.g.
(a) Do not save anything:
All changes made during the session are lost.
Next session will be identical to the previous session.

(b) Save back to backup partition, and don't change name.
Is the original pupsave, used for the original session, held on the "default" partition?
And is a backup of that [plus changes made during the session] placed on the backup partition when this choice is made, and added to the name is text/numbers telling when the backup was initiated?

(c) Restore original backup file to default partition, and remove BKP part.
Which backup does this restore?
A backup copy of the original pupsave? [Backup-0?]...
And does it remove the BKP part so that it has a name IDENTICAL to the original pupsave?
Or...
Does it restore the 1st backup [backup-1] made at the end of the 1st session that MAY include changes made during the session?

(d) SaveAndRestore as described above.
Does this save the latest state of the latest session?
[Whichever session that may be]...
Including all changes made during the session?
And also restore the backup copy of the original pupsave, so that at next boot [producing the next session], the Puppy OS environment will be back as it was during the original/zero session before any backups were made or restored?

5. I have a copy of "Slacko-5.3-MAIN" set up to boot from a CD-RW, with a pupsave file on the internal HDD.
I guess I'll do the experimenting with that.
Need to check out that it looks in good condition to do that.
Back to top
View user's profile Send_private_message 
rhadon


Joined: 27 Mar 2008
Posts: 1293
Location: Germany

PostPosted: Sat 17 Dec 2011, 14:49    Post_subject:  

Hi Sylvander,

thank you for your friendly reply and sorry for confusing.

Usually I boot Slacko from sda2 (with pmedia=atahd), do whatever I want, make sometimes a backup (in this case with Hot Backup-test to sda7) and finish the session.

Now the scenario I've tested and tried to descibe:

Booting with pmedia=ataflash and psavemark=7 let me use one of the BKP files (on sda7). This is now my save file. I can test it, is it working as I expect or does it contain what I want, or have I go back to an earlier BKP file? At the end I'm able to decide:

1) leaving everything as it was before I booted this BKP file,

2) save changes during the session to the BKP file (on sda7), same name, same time as it had before,

3) restore this BKP file (without any changes) to sda2, delete the original file on sda2 and remove the BKP part. For example: I use slackosave-test.BKP111216-09.20.3fs (from sda7). This file will be copied to sda2, the original file slackosave-test.3fs will be deleted and slackosave-test.BKP111216-09.20.3fs will be renamed to slackosave-test.3fs.

4) first save (#2) and than restore (#3).

I hope it's more understandable now.

Your questions brought me to another scenario: what's if I use pmedia=ataflash for my usual booting from sda2 with the usual save file from sda2?

I'm ashamed, I haven't thought about that. But seems to be easy to fix.

I've never used CDs with a pupsave on hd (or maybe a long time ago). I think the main problem is the boot option psavemark, which only allows searching for a save file in a partition of the same drive where Puppy is booted.

I will do some tests during the next days.

btw. your posts inspired me to use ataflash Wink

Thank you,
Rolf

_________________
Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.
Back to top
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3462
Location: West Lothian, Scotland, UK

PostPosted: Mon 19 Dec 2011, 05:40    Post_subject:  

1. Still reading, thinking, reading, thinking...
And attempting to make sense of it all, and attempting to figure out the significance of everything, and whether there might be problems...
Things might not work as I'd expect or hope.
So I think I'll look before I leap.

2. Perhaps the next best step would be to explain how I do things right now...
And perhaps make some points along the way.
Then perhaps ask some further question regarding your method.
Then perhaps you might explain how your method differs from mine, and answer my questions.

3. How I do things right now:
(a) I edit the isolinux.cfg file included in the ISO, to include pmedia=ataflash, and use this altered ISO to burn a CD-RW disk.
The Puppy loaded from such a disk treats the pupsave on an internal HDD [which has been sought, found as suitable, chosen for use if more than 1 found, and loaded into RAM] as though a pupsave on a flash drive.
I can then make a couple of config/coding changes so that (b) and (e) below are possible:

(b) There is no auto-save, during the session, of the changes made during the session.
Manual saves can be made during the session by clicking the "Save" icon at this moment and/or that.

(c) I can choose [or not] if/when to use "PupsaveHotBackup" at one or more particular moments, to make none, or one, or more backups...
To any location I choose.
Normally I hold these on an external USB connected HDD.
During boot these pupsave backups would not be seen because the HDD is [normally] not powered on.
But even if powered on, these backed-up pupsaves would not be listed for use because of the way they are named. [No .2fs or .3fs extension on the end]
With your naming method, would [all of] your backups be listed/offered to be chosen for use?
I like there to be only ONE suitable file found by the Puppy, so that there is no delay, no need to choose, the Puppy simply proceeds to load.

(d) I might, during a session, choose to NOT click the "Save" icon, so any changes made during the session would NOT be saved back to the pupsave during the session.

(e) Then at shutdown, when offered the option "Save the session: Yes/No?"...
If I choose "No"...
Any changes made during the session are NOT saved at this point in time either.
Net result of (d) and (e) is that no changes are saved back to the pupsave

(f) I might make changes early in the session, then...
Click "Save" [1 or more times, each time 1 or more changes are made] to send them to the pupsave...
Then make further changes [unwanted, and beyond my control, like super-cookies?], but NOT make any further saves after the initial save[s].

(g) I am happy with all of the above, but regret that I am unable to make any PUPSAVE-HOT-RESTORE of any PupsaveHotBackup.
A restore must be done by booting to a 2nd Puppy, and using that to do the restore and rename of a chosen PupsaveHotBackup file.

Edited_times_total
Back to top
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3462
Location: West Lothian, Scotland, UK

PostPosted: Mon 19 Dec 2011, 06:38    Post_subject:  

QUESTIONS:

1. "Booting with pmedia=ataflash"
(a) How do you do this?
Same method I use, or by making changes within the loaded Puppy?

2. "and psavemark=7"
This is new to me, can you explain it?
How do you configure this? What does it do?

3. "let me use one of the BKP files (on sda7). This is now my save file"
(a) So you are loading, and saving back to, this file on sda7 [with its name that's different to slackosave-test.3fs on sda2]?

4. "save changes during the session to the BKP file (on sda7), same name, same time as it had before"
(a) Doesn't this mean that the date and time included in the file name is now misleading?
Because the changes included within it relate to a later time?
Back to top
View user's profile Send_private_message 
rhadon


Joined: 27 Mar 2008
Posts: 1293
Location: Germany

PostPosted: Mon 19 Dec 2011, 11:40    Post_subject:  

Hi Sylvander,

Quote:
Still reading, thinking, reading, thinking...

oh my god, I really can imaging the smoke coming out your ears Laughing (friendly and well minded, far away from any negative offence).

Again, sorry for confusion. I'm not experienced in using Puppy from CD (but I'm learning Wink ) and it seems to me that you are not experienced with booting from hd (with grub).

Well, I try to answer your latest questions first:

Quote:
1. "Booting with pmedia=ataflash"
(a) How do you do this?

Booting Puppy from hd via grub:
I can make a permanent entry in menu.lst (I think it's similar to your change in isolinux.conf).

Or in the grub boot menu I can highlight the 'Slacko' entry, press "e" (for edit) and add "pmedia=ataflash" and "psavemark=7" to the kernel line. This is similar to starting from cd with an unchanged isolinux.cfg and using "puppy pmedia=ataflash" at the boot prompt (the first 5 sec.).

Code:
2. "and psavemark=7"
 This is new to me, can you explain it?
 How do you configure this? What does it do?

With booting from cd, you don't need this option (explanation later). Sorry, this was also new to me. It means, that you can boot from e.g. sda2 (internal hd, where the folder /slacko-5.3 is, but using a save file from another partition (here sda7, where my BKP files are).
The lack or the annoying part, you can only choose another partition of the same drive, not another drive.

Quote:
3. "let me use one of the BKP files (on sda7). This is now my save file"
(a) So you are loading, and saving back to, this file on sda7 [with its name that's different to slackosave-test.3fs on sda2]?

Yes. Maybe it's better to say "For this session this is now my save file".

Quote:
4. "save changes during the session to the BKP file (on sda7), same name, same time as it had before"
(a) Doesn't this mean that the date and time included in the file name is now misleading?
Because the changes included within it relate to a later time?

Also yes, if you want. You can test the BKP file without any change at the end, you can make changes permanent at every time with the desktop icon or at the end you can choose to save. Or you can restore this BKP file as it was since the latest hit of the save button on the desktop. Or by using SaveRestore, all changes will be saved to this BKP file and the file will be copied and renamed to your usual folder. Your original save file will be erased. The idea is that you have all choices. No need to press the save button on the desktop if you don't want.

The bad news, the restore part doesn't work for you at the moment. I must change the way of detecting the drive and maybe the path of the original save file. Maybe it must be added manually. 'Don't Save' anything and 'Save' should work.

The good news, in your case it seems to be easy to switch between your original save file(s) on internal hd and your backup files on usbhd.

Have I forgotten to answer something?

Please confirm if you are able and willing to do:

Including my changes, there should be no difference for your daily work as you described earlier at 3. How I do things right now.
The only difference should be at the end: 4 menu items instead of a single Save Yes/No. Don't save anything and Save should work in the same way as your Save Yes/No.

Please make at least 2 Hot Backups with my patched version to your usb hd. Reboot with usb hd plugged in.

You should only see your save files on your internal hd or it should boot directly if you have only one. You should nothing see from the usb drive.

Now reboot and at the boot splash screen (during the first 5 sec.) type in "puppy pmedia=usbflash" (without "" of course). Now you should only see your BKP files on your usb hd. Is this right?

Please be patient with me. Even if 2 native speakers are talking, there is a big area for misunderstanding. And my native language isn't english.

~Rolf

_________________
Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.
Back to top
View user's profile Send_private_message 
lcb

Joined: 08 Jan 2012
Posts: 3

PostPosted: Fri 13 Jan 2012, 16:11    Post_subject:  

Hi rhadon,

I think you should go ahead with your idea. The ability to load a previous session it's a must on this distribution as a lot of packages we install are not well tested, are from other distributions or even sometimes not well implemented, which could break the system on a "reboot", unless we use it as is from the time of installation, with no additions at all, besides the machines or media where Puppy is used from (old computers, pens, etc) could break more easily.

In my opinion:
- the grub.list should contain a "recovery mode" where we could do some "recovery" tasks, including the possibility of selecting a previous .3fs. - it should contain an option to load it from another media;
- the possibility of a selection from automatic backups at certain intervals; also, the process of recovering and restoring should use some faster utility, (I have no clue what is used by now) like the pre-installed 'rsync'.

Summarizing, your implementation of these routines IT IS USEFUL and we thank you for your efforts in making Puppy Linux user friendly and painless in case of "problems" when they arise.

I followed your instructions for the application of modifications, backing it up to another partition of same drive, and I didn't notice anything different. I understand what you did so far is only in a test phase scenario.

* In a way I'm relatively new with Puppy Linux (in fact I use it for a couple years but only now I'm using it on an daily-basis because I have it as a backup server for my other machines/distros, a synergy server, a printer server and a couple more minor uses, besides always having one pen for OSes and disk utilities, so, I apologize for any eventual misunderstandings on Puppy functioning. *
Back to top
View user's profile Send_private_message 
rhadon


Joined: 27 Mar 2008
Posts: 1293
Location: Germany

PostPosted: Sun 22 Jan 2012, 16:57    Post_subject:  

Hi Icb,

sorry for answering so late and thank you for your feedback.

I tried to merge some different ideas (created by others) to make puppy related life easier.

Unfortunately by this way there are too many restrictions and exceptions. At the moment I see no way to solve this. All solutions I can think about would be restricted by one puppy version. Each other version must be manually changed. This is not a good basis for making things easier.

I think it's better to stop until I get a better idea or another solution.

Regards,
Rolf

_________________
Ich verwende "frugal", und das ist gut so. Wink
Raspberry Pi without Puppy? No, thanks.
Back to top
View user's profile Send_private_message 
Sylvander

Joined: 15 Dec 2008
Posts: 3462
Location: West Lothian, Scotland, UK

PostPosted: Sun 22 Jan 2012, 17:13    Post_subject:  

Hello rhadon. Very Happy

I should and do apologize for not replying before now. Embarassed

Our exchanges came at a bad time for me.
Christmas was approaching, with so much to do.

Had I found it easy to understand, all would have been well, but I really cannot find the motivation to take on anything I'm struggling to understand.

Other urgent+important things to be dealt with. Sad

It's a pity, because I consider this worth doing.

Who knows, at some point the bug may hit me, and I'll be back into this.

Provided you are in the mood at the same time.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

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


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1093s ][ Queries: 12 (0.0122s) ][ GZIP on ]