From 258a2f31f04da28fb7100d9f261fad09af47dc68 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sat, 23 Nov 2024 09:36:00 -0500 Subject: [PATCH] add better backup instructions for arch --- infrastructure/graduated/arch/README.md | 125 +++++++++++++++++------- 1 file changed, 89 insertions(+), 36 deletions(-) diff --git a/infrastructure/graduated/arch/README.md b/infrastructure/graduated/arch/README.md index 868f265..a84f7f2 100644 --- a/infrastructure/graduated/arch/README.md +++ b/infrastructure/graduated/arch/README.md @@ -14,7 +14,8 @@ instructions for building a: - [Installation](#installation) - [Preparation](#preparation) - [Installation](#installation-1) - - [Gnome Keyring](#gnome-keyring) + - [Post Install](#post-install) + - [Backup (or restore)](#backup-or-restore) - [Base Tools](#base-tools) - [ZSH](#zsh) - [Prompt Themes](#prompt-themes) @@ -30,8 +31,8 @@ instructions for building a: - [ClamAV](#clamav) - [btrbk](#btrbk) - [fstab](#fstab) - - [Snapshots](#snapshots) - - [Backups](#backups) + - [BTRBK Snapshots](#btrbk-snapshots) + - [BTRBK Backups](#btrbk-backups) - [Backing up a snapshot](#backing-up-a-snapshot) - [Restoring a snapshot](#restoring-a-snapshot) - [Chroots](#chroots) @@ -246,16 +247,25 @@ finish the install. Exec = /usr/bin/systemctl restart systemd-boot-update.service ``` -47. Install gnome: `pacman -S gdm gnome` +47. Install gnome: `pacman -S gdm gnome gnome-tweaks dconf-editor seahorse` - choose pipewire-jack - choose wireplumber - choose noto-fonts-emoji -48. `systemctl enable gdm` -49. Install NetworkManager `pacman -S networkmanager` -50. `systemctl enable NetworkManager` -51. Install gnome nice-to-haves `pacman -S gnome-tweaks dconf-editor seahorse` + (You can remove gnome with pacman -Rcns gnome) + +48. Or install KDE: `pacman -S sddm plasma-meta konsole dolphin` + + - choose pipewire-jack + - choose wireplumber + - choose noto-fonts-emoji + + (You can remove KDE with `pacman -Rcns plasma-meta konsole dolphin`) + +49. `systemctl enable gdm` or `systemctl enable sddm` +50. Install NetworkManager `pacman -S networkmanager` +51. `systemctl enable NetworkManager` 52. Install tpm2-tss for tpm2 disk decryption `pacman -S tpm2-tss` 53. Setup tpm2 disk decryption @@ -266,16 +276,77 @@ finish the install. 54. `exit` 55. `reboot` -### Gnome Keyring +## Post Install -Don't set a password for single-user systems. We're using full-disk encryption. This will let you -login with just a fingerprint. +### Backup (or restore) -1. Install `seahorse` if you haven't already -2. Open the `Passwords and Keys` apps -3. Create a new Password keyring called "Login" -4. Do not enter a password -5. Set it as default +Dot directories: + +```bash +.aws +.bash_history +.cache +.config +.continue +.gitconfig +.icons +.kube +.local +.minecraft +.pyenv +.ssh +.steam +.var +.vimrc +.vim +.vscode +.vscode-oss +.wireguard +.zshrc +.zprofile +.zsh_history +``` + +And then your home directories: + +```bash +AUR +Applications +Desktop +Documents +Downloads +Homelab +Music +Pictures +Projects +Recovery +Videos +'VirtualBox VMs' +``` + +And then various root directories: + +```bash +/var/lib/libvirt +``` + +I would recommend creating a directory called ".backup" to store relevant files. + +You can put the contents of your file lists into three files: + +.backup/dotfiles.txt +.backup/homefiles.txt +.backup/rootfiles.txt + +Then you can use rsync to backup or restore them: + +```bash +rsync -arv --progress --files-from=$HOME/.backup/dotfiles.txt /home/ducoterra/ /btr_pools/backup/112224_Backup/dotfiles +rsync -arv --progress --files-from=$HOME/.backup/homefiles.txt /home/ducoterra/ /btr_pools/backup/112224_Backup/homefiles +rsync -arv --progress --files-from=$HOME/.backup/rootfiles.txt / /btr_pools/backup/112224_Backup/rootfiles +``` + +Then, using `rsync`, either backup or restore the relevant directories. ### Base Tools @@ -599,7 +670,7 @@ mount -a btrfs sub create /btr_pools/root/.snapshots ``` -##### Snapshots +##### BTRBK Snapshots `mkdir /etc/btrbk` @@ -658,7 +729,7 @@ Then enable the service systemctl enable --now btrbk_snapshots.timer ``` -##### Backups +##### BTRBK Backups Before you begin, go through the usual process of setting up an encrypted drive. If you're using Gnome I recommend using the GUI since it handles encrypted USB drives really nicely. @@ -677,24 +748,6 @@ backed up. These include: 1. /var/lib/libvirt 2. Nextcloud -Third, I'd recommend iterating dot directories you'd need to restore and writing them down -somewhere: - -1. .aws -2. .cache -3. .config -4. .gitconfig -5. .icons -6. .kube -7. .local -8. .minecraft -9. .mozilla -10. .ssh -11. .steam -12. .vimrc -13. .wireguard -14. .zshrc - Now set up the backup: 1. Create a backup config