Using whiteouts
Using whiteouts
I was experimenting with a script that writes whiteouts for files on a list, so that I can try out varying combinations by simply adding/removing the whiteouts. The whiteouts (in the "snap" layer) save (at least on my grub install) across boots, so I can restore or delete the files anytime I want.
Kind of interesting playing with this to learn about whiteouts. Checking it "ON" sets a new mark. Any new files created in /usr will get a whiteout when you push the "Block" button. They can then be permanently deleted or restored.
If you reboot, the whiteout files aren't in the "save" layer, so they won't work. On a flash install, I don't think anything is saved from the snap layer, so even the whiteouts will be gone. On a regular grub install, the whiteouts remain, and the files can be restored or deleted as before the boot.
I limited the files to /usr for safety reasons, but other directories could be included.
If you reboot, the whiteout files aren't in the "save" layer, so they won't work. On a flash install, I don't think anything is saved from the snap layer, so even the whiteouts will be gone. On a regular grub install, the whiteouts remain, and the files can be restored or deleted as before the boot.
I limited the files to /usr for safety reasons, but other directories could be included.
- Attachments
-
- Gno-Save.png
- (16.02 KiB) Downloaded 484 times
-
- gno-save-1.0.pet
- (1.88 KiB) Downloaded 354 times
jpeps
white outs is an interesting subject since we have mounted sfs'
a lot of things have already been done
this will interest you with more information
Dougal author
http://www.murga-linux.com/puppy/viewto ... 0ac12510b9
note that there is no package linked it was removed but....
this has a link to the original package
Ray MK posted a link
http://www.murga-linux.com/puppy/viewto ... 2&start=10
note I was credited for both links on this page but I did not write the white outs script
the author of that is Dougal * I however wrote the memory cleaner linked there
Joe
white outs is an interesting subject since we have mounted sfs'
a lot of things have already been done
this will interest you with more information
Dougal author
http://www.murga-linux.com/puppy/viewto ... 0ac12510b9
note that there is no package linked it was removed but....
this has a link to the original package
Ray MK posted a link
http://www.murga-linux.com/puppy/viewto ... 2&start=10
note I was credited for both links on this page but I did not write the white outs script
the author of that is Dougal * I however wrote the memory cleaner linked there
Joe
Hi Joe,big_bass wrote:jpeps
white outs is an interesting subject since we have mounted sfs'
a lot of things have already been done
this will interest you with more information
I recall getting involved in this during the development of sfs-on-the-fly, and wrote my own scripts to monitor and/or delete them so things would load correctly. Since we have them, I thought maybe there was some other usefulness.
I updated this so it works with all directories. Various buttons:
set mark: check to add a new mark. New files are anything written after setting the mark.
Files: finds new files in selected directory (can edit)
Build: Adds files from the "files" list to a build list (can edit)
Block: Creates whiteouts for files on the list. For "/mnt" directory, it simply moves files to .files.swp so they can be restored if desired.
Restore: Restores files by removing the whiteouts, or in /mnt/ moving the .swp file back to it's original name
Delete: Deletes the whiteout and files.
edit: one use is easy management of .mozilla caches
note: for cli usage, run "no-save -h" for options (works for /usr files).
- Attachments
-
- gno-save-2.0.pet
- (2.64 KiB) Downloaded 443 times
-
- gno-save.png
- (12.75 KiB) Downloaded 833 times