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

Re: backing up backups



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


Reply to: