Rich Freeman via plug on 8 Feb 2022 06:08:40 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] utils


On Mon, Feb 7, 2022 at 10:12 PM Lynn Bradshaw via plug
<plug@lists.phillylinux.org> wrote:
>
> I obviously use a tool like Git when more power is needed but for some
> purposes, by analogy, if I were a farmer having troubles with rats, it
> would be adequate to use an air rifle rather than an M249 SAW for pest
> control. trash-cli is pretty much the same.
>

So, git is useful for stuff like /etc where the files are small and
there is a lot of value in having VCS control over them.  There is a
package called etckeeper available for most distros that contains
hooks for most package managers to improve that workflow (it will
auto-commit any changes before doing another round of updates in case
you aren't keeping up with them, so that you don't go into etc and
find a gazillion modified files with no commit history).

However, a big issue with git is that without a fair bit of hacking it
doesn't support actual permanent deletion, which makes it unsuitable
for general-purpose use.  Most people would benefit from snapshot-like
capability that gives them the ability to go back and recover from
errors for a reasonable period of time, without being locked into
having a browser Downloads folder that slowly consumes their entire
hard drive.

I think the dream was that btrfs would have saved us a long time ago,
but that filesystem has been fraught with issues.  Sure, LVM sort-of
works but it isn't really a great solution (it seems more suited to
temporary snapshots for backups/etc than semi-persistent ones).  ZFS
works fine for the most part, but it has GPL-compatibility issues, and
doesn't really get as much care as it could as a result.

I use zfs and it provides this capability nicely when combined with a
cron-driven script to manage snapshots (there are a bunch out there).
My large-scale storage is on lizardfs which also provides snapshots.
For the typical desktop distro though everything is on ext4 and the
best you can do with that is the trash can functionality or LVM.

It isn't really the fault of snapshots, but I'll also note that if you
use a rolling-release distro like gentoo/arch/etc then snapshots on
your root filesystem do consume a significant amount of space as
everything turns over frequently.  For a release-based distro the
simple solution would be to just not snapshot that stuff since it is
pretty easy to recover.  With the read-only /usr concept you'd just
have a squashfs snapshot for that sort of thing.  Stuff like /var/lib
will also tend to need a lot of room for snapshots, though outside of
servers this tends to be small on most systems.

-- 
Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug