How to combine all Multi-session files on HDD into a single file?

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

How to combine all Multi-session files on HDD into a single file?

Post by Clarity »

I am sure someone(s) has found a way to do this, so I ask for some guidance or your script.

I have, now, 5 multisession files on my HDD and they are found by taking the 3rd boot option from FD810 boot screen to gather them at boot and 2 save anew, if necessary, at shutdown.

Would anyone be willing to share their command or script to combine the 5 into 1, please? I assume you may be using an rsync or some comparable command.

Thanks in advance for guidance.
User avatar
smokey01
Posts: 171
Joined: Sun Jul 12, 2020 10:46 am
Location: Australia
Has thanked: 21 times
Been thanked: 25 times
Contact:

Re: Combine all Multi-session files into a single file

Post by smokey01 »

Why do you want to do multi session saves to a HDD?

Why not do a save file or save directory on your HDD.

Multi session saves are normally done to CD and DVD.

You appear to be over complicating things.
Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

Re: Combine all Multi-session files into a single file

Post by Clarity »

No not really. I work in sessions. So I understand what is done whenever I am operating and all things I do are contained within a session.

By maintaining the sessions on disk, I can individually select when and if I need to backtrack and I tend to know when certain things are done by looking at the time stamp(s).

I dont have any problem and I am not complicated or complex in what I do.

If all is well at the end of a session, it gets saved. If things are not what I expect, I know how to stop the running system and start over at a given point.

Now, I just need to do something that seems obvious; namely combined the selected session into one.

So, as you can see, I am taking a complication of confluence and simplifying it into one.

Simple for me.

Can anyone who understands how to combine the timestamped files, share what they know. I should, then, be able to construct a rsync command or GUI to bring them together into a singularity.

It seems simple.

Thanks in advance, if you can help.
User avatar
garnet
Posts: 66
Joined: Tue Aug 04, 2020 2:21 pm
Location: Alexandria
Has thanked: 6 times
Been thanked: 12 times

Re: Combine all Multi-session files into a single file

Post by garnet »

Does this post from rufwoof help? (⌒▽⌒)
http://oldforum.puppylinux.com/puppy/vi ... 56#1028256

Hope that helps ^_^

Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

Re: Combine all Multi-session files into a single file

Post by Clarity »

Thanks, not exactly, but, offers a pathway to capture the multi-session files.
tallboy
Posts: 40
Joined: Fri Aug 14, 2020 5:41 am
Been thanked: 7 times

Re: Combine all Multi-session files into a single file

Post by tallboy »

If the dog is made like the ordinary Puppy multisession saves, the procedure when booting a live Puppy multisession CD/DVD into RAM, is that the latest session is read first. That is because a newer file can not be overwritten by an older file. So, if you have several sessions, each holding a newer version of the same file, only the latest one is loaded, thus preventing a lot of time-consuming overwriting.
I don't really see what you intend to achieve, do you want all previous versions of a file to exist side by side in the new single multi-version of multisession files? That will require some serious scripting, I won't even think about it.
On the other hand, if you accept that the new multi-version only have the latest version of a file that you have been working with, just copy the separate multi-sessions one by one into the latest one, the oldest one being the last one to be copied. That is how they usually are loaded at bootup.
Read up on cp first, you may want to use some options to that command, to avoid a lot of questions that need a yes/no answer while copying.
Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

Re: Combine all Multi-session files into a single file

Post by Clarity »

No that is not the objective. AND THANKS for your suggestion to use cp command. i assume you are suggesting to EXPAND EACH Multi-session SFS file into series of folders, then to build some sort of a cp command to copy each folder one after the other into a single folder.

I found a discussion on the old forum between forum members @Ted Dog and @jamesbond where there was some collaboration on perfecting the ability for FD8 to save the session files to faster media, yet save the sessions in the exact same way as is done of DVDs. I believe I found reference to that work on the FD810 FAQ somewhere which led me that body of work.

For me (and probably others) this pattern of saving and amassing them at boot time offer several advantage...not to mention the ability to delete a wayward session when necessary or to delete a session after you've tested some changes that you may not want to keep in the future.

But, after gaining 5 sessions on the USB where they are saved, I am sure I can speed booting if I can combined their contents appropriately into a single file ... manually.

In observing the boot process, yes, I can see how they are being processed singly at boot time and am hopeful that there is a utility that will do that for me...or that I can properly use a linux command to assemble them into a single file. That single file can be a replacement OR I can save it as a backup.

I dont want this to be a big deal for anyone, but, was curious as someone else may have solved this with a simple utility or script or command (ie cp/rsync/cpio/???)

So, as simple as it seems you may be suggesting that combining them as is done at FD810 system boot processing does it, may not be a simple task. ???

In case you have never tried what TedDog + Jamesbond did, it relates to something that they made simple for handling sessions and it was added to the FD Boot Menu.
  1. Boot FD
  2. At the Menu navigate down to the 3rd line
  3. Select "e" or "tab" to edit the entry
  4. Change the sr0 to sdb1 for example
  5. F10 to allow boot
  6. When you have completed your work/session at shutdown/reboot time, your session work will be saved on sdb1
This will be done EVERY time you boot your system as the Boot process will find sdb1 and take all of the sessions, combining them and puting you in the desktop right where you were when left. Thusly, over time, there will be several Multi-session files saved on sdb1

YES, I KNOW, this is the same that is done by just having a save-folder or save-file. But, for people like myself, the multi-session Menu boot entry has advantages as I can merely delete sesssions if/when necessary.

Now, if I could learn to save them as one multisession file via a command, I will never need to Remaster again.
williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Combine all Multi-session files into a single file

Post by williams2 »

http://www.murga-linux.com/puppy/viewto ... 88#1049623
If you boot, let the save sfs's load and then once booted you remove all of those sfs's and then run a 'save' (click the desktop save icon), it in effect rebuilds all of those multiple save sfs's consolidated into a single save sfs
tallboy
Posts: 40
Joined: Fri Aug 14, 2020 5:41 am
Been thanked: 7 times

Re: Combine all Multi-session files into a single file

Post by tallboy »

The same thing happens when a multisession CD/DVD is full, and you are asked to burn a new one. All the saved sessions are combined into one new.
Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

Re: Combine all Multi-session files into a single file

Post by Clarity »

AHA! Thanks @tallboy!!! :thumbup2:

Then there is a utility or a script or a function that will take all of the multi-session files it finds and combine them.

Now to try to find out where that utility is.

Edit: Opps, there is one difference...the DVD's files are not SFSs. But maybe that utility will lead to an idea for SFS processing to combine the sessions into one.
User avatar
Flash
Moderator
Posts: 978
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 127 times

Re: Combine all Multi-session files into a single file

Post by Flash »

In the case of a multisession DVD, as Puppy boots, it incorporates the changes from the saved sessions. If you then put a freshly burned DVD (using the same Puppy iso) into the drive and shut down, all those changes are saved in a single session on the new (now multisession) DVD.
Chaos coordinator :?
user1111

Re: Combine all Multi-session files into a single file

Post by user1111 »

I use HDD based multi-session saves, to 'merge' them I just boot, so they're all loaded, and move (or delete) the current multi-session save files, and then run a 'Save' (click desktop 'save' icon) which creates a new single save file (actually its two files initially), in effect merging them all into one.

Personally I love that choice of boot as you can save things incrementally, so to 'undo' the last save you just delete the most recent multi-session save file (sfs).
Clarity
Posts: 3829
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1628 times
Been thanked: 523 times

Re: Combine all Multi-session files into a single file

Post by Clarity »

Wow @Rufwoof. That may be a circumvent to the need for a utility.

Essentially as you explain to get a "combined" session file in FD810 I should
  1. Boot with Multi-session option(s) I use
  2. Rename or delete ALL of the prior sesssion files
  3. Click the desktop's "Save session" icon
I'll try this

Edit 1: For this FD810 on this PC the save-session files are as follows;
  • There is a "set" of 1 base file and 1 save file, originals, with identical timestamps
  • There are 3 other timestamped save files since the original 2
Curious to see if the Save session desktop utility is smart enough to recreate a set to mimic the originals.

Edit 2: NO! Things do not see to achieve the desired need. There is NO "set" created. And the new file pales in comparison:
The combined original set of Multi-sessions is 1.6GB while ONLY a single 54MB session file is creates.

Edit 3: The 3 steps above do NOT achieve the objective.

Conclusion: There remains a need to combine the past save sessions into a singularity set.

Code: Select all

-rw-r--r--  1 root root       4096 Jul 16 16:43  multi-fd64save-2020-07-16T20-43+00-00-base.sfs
-rw-r--r--  1 root root    1236992 Jul 16 16:43  multi-fd64save-2020-07-16T20-43+00-00-save.sfs
-rw-r--r--  1 root root  218640384 Jul 17 04:23  multi-fd64save-2020-07-17T04-22-04-00-save.sfs
-rw-r--r--  1 root root 1411620864 Aug  5 11:21  multi-fd64save-2020-08-05T11-13-04-00-save.sfs
-rw-r--r--  1 root root   60346368 Aug  5 12:24  multi-fd64save-2020-08-05T12-24-04-00-save.sfs
user1111

Re: Combine all Multi-session files into a single file

Post by user1111 »

Works for me. I wonder if its because I load the basesfs into ram, grub4dos menu.lst entry ...

Code: Select all

title Fatdog 810 Final
root (hd0,0)
kernel /FATDOG810-FINAL/vmlinuz pkeys=uk basesfs=ram:uuid:4d054dbd-ff6f-48d7-94ac-e9023c62d0f1:/FATDOG810-FINAL/fd64.sfs savefile=direct:multi:uuid:4d054dbd-ff6f-48d7-94ac-e9023c62d0f1:/FATDOG810-FINAL/: 
initrd /FATDOG810-FINAL/initrd
where the UUID's for the disks was obtained using the blkid command

The new set will tend to be smaller than the sum of all prior sets as it just takes the topmost level, but in your case the new set (base and save) did look too small given the GB sizes of the prior set.
baldronicus
Posts: 80
Joined: Sat Aug 29, 2020 6:55 am
Has thanked: 43 times
Been thanked: 15 times

Re: Combine all Multi-session files into a single file

Post by baldronicus »

Hi Clarity et all. Apologies for butting in. I don't think this will help, but sometimes an idiot (EDIT- i.e. me, just to be really clear) asks something that triggers things for those (such as rufwoof) that do have knowledge and understanding. Multi-session is one of the ways I run with Fatdog64. However, it is on a USB drive using Grub4Dos to boot. So it is not the same as your situation.

First off, I presume (since you have multi-session working) that you would have read the Fatdog64 Help -> boot options -> Advanced Parameters -> savefile stuff. I know you have multi-session running, but have to ask.

1.6 Gig. Wow. That seems more than just simple configuration stuff. Would there be a chance that there is some data in one save that has subsequently been deleted in a following one? I am not trying to pry, and I know it doesn't answer the question of the base "set" not being generated, but have to ask.

As you have the files, you have obviously backed them up. Would it be worthwhile maybe trying again with just the original "base" sfs files and the first of your real saves (just as a test to minimise the variables)?

Maybe try:
Copy the original two (2) "base set" sfs files back to the location that Fatdog will look for the multi-session saves.
Copy the sfs file of your first non-base save to the same location.

After confirming that your backups are complete, move them out of harm's way (I know they probably already are, just have to mention it).

Delete all other stuff from the location that Fatdog will look for multi-session files.

Run a fresh boot of Fatdog, so that it only "picks up" the stuff you want. Maybe have a quick look to check that something you would expect from your first save is there (just to make sure things are still working). EDIT- Maybe the time.

Mount the partition with the multi-session files (I presume that, like the USB partitions, the hard drive multi-session partition won't be mounted, but will appear on the desktop). Delete all the files in that location (i.e. the ones you had copied earlier).

Unmount that and all other partitions.

Click on the "save.session" icon. Once Fatdog has processed the data it should, I think, mount the multi-session partition, write the new files and then unmount the partition again. Note that I am just going off the top of my head and could have it wrong.

As usual I am too verbose and, again, I don't know if it will help. But it might be worth a try.
Thanks.

EDIT 2: Sorry about adding more but some others things came to mind. If I am asking about info that you have already given above then I apologise- I'm just going on the fly.

a) I wonder if the process is simply not getting a chance to complete.
i) maybe try invoking the process using the shutdown path rather than using the save.session icon. Theoretically Fatdog should be able to complete the process, and any writes, before shutting down.
ii) Could Fatdog be running out of usable RAM for the process? I don't know how you would tell, but there is some mention of RAM usage and considerations in the "How to split... the Fatdog.... initrd..." (I forgot the name of the thread, of course), although it is in the Fatdog section, so I think you should find it. I think Rufwoof also details an alternative swap mechanism in that thread.

b) Are you using an ext4/3/2 filesystem for the multi-session files? Or is it a non-native filesystem (NTFS, Fat32). Again, I know things are working apart from this aspect, but just have to ask.

c) If you might have been experimenting with stuff, could there be some active code running that might interfere with the process?

Just thoughts that I don't know will be of any help. I'll try to run away and leave everyone in peace now :) Thanks.
user1111

Re: Combine all Multi-session files into a single file

Post by user1111 »

Merging the fd64.sfs and multisession saves (cross reference link)

viewtopic.php?p=8823#p8823

Very much like a 'remaster' of sorts.
Post Reply

Return to “FatDog64”