On 4/13/22 20:03, Default User wrote:
> On Wed, Apr 13, 2022 at 4:42 PM David Christensen wrote:
>> As you find system administration commands that work, put them into
>> scripts:
>>
>> #!/bin/sh
>> sudo rsync -aAXHxvv --delete --info=progress2,stats2,name2
>> /media/default/MSD1/ /media/default/MSD2/
>>
>>
>> Use a version control system for system administration. Create a
>> project for every machine. Check in system configuration files,
>> scripts, partition table backups, encryption header backups, RAID header
>> backups, etc.. Maintain a plain text log file with notes of what you
>> did (e.g. console sessions), when, and why.
>>
>>
>> Put your OS on a small, fast device (e.g. SSD) and put your data on an
>> array of large devices (e.g. ZFS pool with one or more HDD mirrors).
>> Backup both as before. Additionally, take images of your OS device.
> Yikes!
>
> David, I really think I am too old to learn all of that. But maybe I can
> learn at least some of it, over time. Please understand that I am not
> training to be a real system administrator, except that I guess anyone is
> (or should be able to be) actually the "system administrator" of their own
> computer(s).
>
> Anyway, thanks for the advice.
I learned the above tools because they save time, save effort, and
provide features I want.
I use dd(1) and an external HDD for images. You will want to write
scripts (like the simple example I previously showed).
CVS has more than enough power for a single user/ system administrator,
and is simpler than Git. Here are the common use-cases:
1. Install CVS (and SSH) on Debian:
# apt-get install cvs openssh-client openssh-server
2. Create a CVS repository:
# mkdir -p /var/local/cvs/dpchrist
# cvs -d /var/local/cvs/dpchrist init
# chown -R dpchrist:dpchrist /var/local/cvs/dpchrist
3. Add CVS client environment variables to your shell (adjust host and
username as required):
export
CVSROOT=dpchrist@cvs.tracy.holgerdanske.com:/var/local/cvs/dpchrist
export CVS_RSH=ssh
4. Create a project:
$ mkdir -p import/myproject
$ cd import/myproject
$ touch .exists
$ cvs import myproject dpchrist start
5. Check-out a working directory of a project from the repository:
$ cd
$ cvs co myproject
6. Add a file to the project working directory meta-data:
$ cd myproject
$ vi myfile
$ cvs add myfile
7. See changes in the working directory compared to the repository:
$ cvs diff
8. Bring in changes made elsewhere and checked-in to the repository:
$ cvs update
9. Check-in working directory to the repository:
$ cvs ci
10. Remove a file from the project:
$ rm myfile
$ cvs rm myfile
See the GNU CVS manual for more information:
https://www.gnu.org/software/trans-coord/manual/cvs/html_node/index.html
ZFS is a new way of doing storage with disks, arrays, volumes,
filesystems, etc., including backup/ restore (snapshots and
replication). The learning curve is non-trivial. The Lucas book gave
me enough confidence to go for it:
https://mwl.io/nonfiction/os#fmzfs
David
Hey David, thanks for the information.
BTW, I think I have narrowed the previous restore problem down to what I believe is a "buggy" early UEFI implementation on my computer (circa 2014). Irrelevant now; I have re-installed with BIOS (not UEFI) booting and MBR (not GPT) partitioning. And have successfully tested restoring using both Timeshift and Conezilla.
And regarding learning by experience - oh, how I know. I've done so much of that, I have a degree from the "school of hard knocks"!
Finally, fun fact:
Many years ago, at a local Linux user group meeting, Sun Microsystems put on a demonstration of their ZFS filesystem. To prove how robust it was, they pulled the power cord out of the wall socket on a running desktop computer. Then they plugged the cord back in and re-booted, with no problems! Yes, I was impressed.