Is there a utilty to expose the contents of a save-session file?

Moderators: 666philb, Forum moderators

Post Reply
Clarity
Posts: 3348
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1379 times
Been thanked: 444 times

Is there a utilty to expose the contents of a save-session file?

Post by Clarity »

2 Questions

  • Does FossaPUP have such a utility to open a session "file"?

  • Can an exposed session be saved as a folder?

User avatar
666philb
Posts: 429
Joined: Thu Jul 09, 2020 3:18 pm
Location: wales uk
Has thanked: 111 times
Been thanked: 146 times

Re: Is there a utilty to expose the contents of a save-session file

Post by 666philb »

you can just click on a savefile to see its contents
to convert a savefile to a savefolder @gyrog has a utility here viewtopic.php?f=105&t=785
savefolders can only be used on a linux partition

User avatar
mikewalsh
Moderator
Posts: 5651
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 596 times
Been thanked: 1733 times

Re: Is there a utilty to expose the contents of a save-session file

Post by mikewalsh »

@Clarity :-

Yes, like Phil says; no special utility needed. Just click on it.....it mounts, and displays what's inside. To unmount, click on it a second time.

The save-file can be used on any file-system, as it is a special type of 'squash' file, with its own Linux file-system inside. Save-folders, on the other hand, are no different to any other folder, and take on the characteristics of the underlying file-system. For Linux, obviously, this needs to be a Linux file-system.

There are utilities floating about that'll do the conversion for you, though personally I find it just as easy to do it manually:-

  • Create a new directory. Give it the same name as your save-file.....minus the extension. For instance:-

"xenialpupsave-mike.3fs" becomes "xenialpupsave-mike".

  • Click on the save-file to mount and display the contents.

  • Copy the contents of the save-file across to the new save-folder.

  • Remove the save-file from its original location, and replace it with the new save-folder. At next boot, Puppy should pick it up as though nothing's changed.

Any scheduled backups will copy a folder, just as easily as they will a file. The only downside to a save-folder rather than a save-file is speed of backup.The save-file is a single compressed item, and as such transfers faster. The save-folder has to copy every single file within individually. Therefore, it takes longer.....but it's a small price to pay for the added convenience.

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
rcrsn51
Posts: 1244
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 284 times

Re: Is there a utilty to expose the contents of a save-session file

Post by rcrsn51 »

mikewalsh wrote: Wed Nov 18, 2020 10:44 am

The save-folder has to copy every single file within individually. Therefore, it takes longer

Or you could use a tool that compresses it into a single file.

Copy the contents of the save-file across to the new save-folder.

Because you are doing the copy as the root user, you need to ensure that the operation preserves any non-root ownership/permissions that may be in your save file.

User avatar
mikewalsh
Moderator
Posts: 5651
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 596 times
Been thanked: 1733 times

Re: Is there a utilty to expose the contents of a save-session file

Post by mikewalsh »

rcrsn51 wrote: Wed Nov 18, 2020 2:44 pm
mikewalsh wrote: Wed Nov 18, 2020 10:44 am

The save-folder has to copy every single file within individually. Therefore, it takes longer

Or you could use a tool that compresses it into a single file.

Copy the contents of the save-file across to the new save-folder.

Because you are doing the copy as the root user, you need to ensure that the operation preserves any non-root ownership/permissions that may be in your save file.

Yes, agreed, Bill. Not sure how that would work for other people, I admit. The few 'spot' permissions I have myself are all set-up within external applications, which are then started from custom Menu entries.....

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

user1111

Re: Is there a utilty to expose the contents of a save-session file

Post by user1111 »

.3fs save files I believe are based on ext3 format file filesystem

i.e. to create a new/empty one ..
dd if=/dev/zero of=savefile.3fs bs=4096 count=1024 ... or whatever count/size
mkfs.ext3 savefile.3fs

You can mount them ...
mkdir mountpoint
mount savefile.3fs mountpoint

I'd be inclined to make a sfs of the original once mounted
mkdir mountpoint2
mount currentsavefile.3fs moutpoint2
mksquashfs mountpoint2 my.sfs

and if you'd dd'd/created and mounted a new one then unsquashfs the sfs into that

unsquashfs -f -d mountpoint my.sfs

before unmounting them
sync
umount mountpoint mountpoint2

All untested/off-top-of-head code, that I suspect is 'close-enough'.

mksquashfs/unsquashfs does a decent job of retaining file permissions.

user1111

Re: Is there a utilty to expose the contents of a save-session file

Post by user1111 »

mikewalsh wrote: Wed Nov 18, 2020 10:44 am

The only downside to a save-folder rather than a save-file is speed of backup.The save-file is a single compressed item, and as such transfers faster. The save-folder has to copy every single file within individually. Therefore, it takes longer.....but it's a small price to pay for the added convenience.

Are savefiles compressed? I thought they were just file filesystems - that would only be 'compressed' if formatted to a filesystem that used compression - such as btrfs/zfs (assuming compression was enabled).

User avatar
rcrsn51
Posts: 1244
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 284 times

Re: Is there a utilty to expose the contents of a save-session file

Post by rcrsn51 »

mikewalsh wrote: Wed Nov 18, 2020 4:25 pm

Yes, agreed, Bill. Not sure how that would work for other people,

By backing up the folder with a compression tool that preserves those ownership/permissions.

Clarity
Posts: 3348
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1379 times
Been thanked: 444 times

Re: Is there a utilty to expose the contents of a save-session file

Post by Clarity »

You, each, are exposing why I asked (those multiple considerations you shares are what a maintenance utility would provide).

In review of the thread, I agree with the manual techniques and the considerations all are raising.

Maybe a mock-up utility would help and could find its way into WoofCE for all PUPs. :idea:

williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: Is there a utilty to expose the contents of a save-session file

Post by williams2 »

savefiles are never compressed if it is ready to use.
Like any other file, savefile can be copied, moved, deleted. zipped, tarred, etc.

A partition consists of bytes of data on a device like a hard drive or a usb drive.
A file, any file consists of bytes of data on a device like a hard drive or a usb drive.

A bit is a binary digit, that is, a 1 or a 0 (zero).
A byte is a block of 8 bits, for example, 11010010
A byte can be thought of as one of 256 possible numbers.
For example, a byte could be a number on the range 0 to 255.
Or a byte could be a number from -127 to +128.

There is no difference between a byte in a partition, and a byte in a file.

When a block of data is formatted with a file system, like ext3,
some of the bytes are set to values which will be used to store filenames, or to store inode numbers, or file permissions, etc etc.

A file system in a file is byte for byte absolutely identical to a file system in a partition.

An sfs file is usually compressed, but it may not be compressed.

A savefile is not an sfs squash file system file.
An sfs file is not a savefile.

cp -a or rsync -a or tar should preserve attributes like file ownership and permissions.
Copying using roxfiler should preserve attributes like file ownership and permissions.

Post Reply

Return to “Fossapup64”