Fred T. Hamster [Sun, 6 Apr 2025 18:08:07 +0000 (14:08 -0400)]
cleans directories with different hierarchies
this new tool compare_whacker is super handy.
i have a newer scheme for managing my digital pictures and an older scheme.
the two schemes are incompatible (old one used the camera name as the main index
and the new scheme just uses the data from the picture metadata).
the compare whacker was written so i could clean up a redundant copy of my pictures
that were stored in the old scheme. i needed to find all the picture names that were
the same across the two.
NOTE: some pictures re-use the filenames on the pictures, and this creates havoc with
this script. use more precise hierarchies if you have lots of identical file names!
Fred T. Hamster [Sun, 6 Apr 2025 12:52:21 +0000 (08:52 -0400)]
tasty updates for comparator
now very much a reusable tool for others, since the hard-coded names for the comparator have
been cleaned up. now these scripts just use the MAJOR_ARCHIVE_SOURCES and the command line
parameters to ferret out the proper locations to synch.
successfully used against both localhost, a remote host, and a local disk archive now.
Fred T. Hamster [Thu, 3 Apr 2025 15:05:07 +0000 (11:05 -0400)]
traced an issue with mirror mode
we will only mirror, aka delete, when the hierarchy on the target is one that already exists on the source.
this is a consequence of the necessary scooping of the "*" under a hierarchy to be copied to the target,
rather than trying to copy at the same height for the directory trees (which will lead to a basement folder being
created under the remote target basement, i.e. /media/fred/archivedrive/basement/basement, rather than
copying direct contents. so for now, we are limited by our use of rsync for this, unless there's a mode to
do a direct directory copy rather than its current behavior.
Fred T. Hamster [Wed, 2 Apr 2025 22:57:32 +0000 (18:57 -0400)]
adding safeguards to not overwrite same name files
there was a possibility that a file like ~blah.xlsx could overwrite blah.xlsx, which is a huge issue. don't want to scrap any active files like that, so now we are checking at different stages in the rename process to ensure there are at least no overwrites.
Chris Koeritz [Sun, 9 Mar 2025 20:26:12 +0000 (20:26 +0000)]
revised to add --ssl flag
saw my backups starting to be empty, and found that this needs a --ssl
flag to be happy, except that before i made the change, the backups had
started working again. not sure wtf, except maybe i installed a missing
bit last time i was fuggling around with this stuff?
Chris Koeritz [Fri, 7 Mar 2025 21:30:27 +0000 (21:30 +0000)]
fixed sanitized username again...
...so it doesn't think it can reset USER variable if it's broken.
also fixed safedel to not loudly complain if its attempted chmod
doesn't work right, which will always happen when, for example, the
www-data user is using feisty meow code, but it cannot chmod the linked
customize directory since that's linked to the real feisty meow
code which www-data has no perms on.
Chris Koeritz [Fri, 7 Mar 2025 20:50:08 +0000 (20:50 +0000)]
bandaids for sanitize_username
making sure this should never produce an empty string as the sanitized
username, something we wanted to be sure about after seeing some really
odd log file names for our www-data user.
Fred T. Hamster [Fri, 31 Jan 2025 16:13:26 +0000 (11:13 -0500)]
removed reference to CLOUD_BASE in variables
need to figure out a nicer way of using CLOUD_BASE
in scripts like move spams, so there can be a generalized
thing that anyone could use, instead of it depending on my specific cloud
structure.
Fred Hamster [Mon, 16 Dec 2024 23:41:15 +0000 (18:41 -0500)]
super nice approach to doing a bunch of machines
uses the host strider, but manages the set pretty well itself
and generates the commands it needs to run.
ps: the approach where it saves the script file to a temp file? this is how we can do functions too.
Fred Hamster [Mon, 16 Dec 2024 21:06:29 +0000 (16:06 -0500)]
moving to sanitized user
don't want to use the bare USER variable any more, since we have seen that including an email domain (e.g. blah@flork.com instead of just blah).
so these changes should use a sanitized version without the email portion.
Fred Hamster [Mon, 16 Dec 2024 18:13:31 +0000 (13:13 -0500)]
reverted to proper shebang
using the "newfangled" env method for finding bash, since we have now seen firsthand that /bin/bash is no longer reliable for all the platforms we want to work on (if it ever was)...
Fred Hamster [Sat, 14 Dec 2024 18:50:53 +0000 (13:50 -0500)]
updated to not fail if cannot enumerate adapters
macos is evading us, but we don't want the failure to enumerate to become a test failure.
it's a severe lack in the code, sure, but nothing is dependent on it yet...