pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit 958d88619427d680802c82b151ab3c2adf5c5eb8
parent 6b2bbb0a1fb2202dd2770e1ba568af957933067f
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue,  1 Nov 2022 23:18:44 +0000

smoke_me_a_kipper

Diffstat:
Mentry/smoke_me_a_kipper.md | 44+++++++++++---------------------------------
1 file changed, 11 insertions(+), 33 deletions(-)

diff --git a/entry/smoke_me_a_kipper.md b/entry/smoke_me_a_kipper.md @@ -2,7 +2,7 @@ Earlier this year I wrote about my [backup setup](20220414-speak_of_the_dedup.html) and recently I had to put it to the test. -My PC is a tower that I have on a small stand next to my desk. In the past I had kept the case (an Antec 1200) on my desk but it is rather large and dominates the space a bit too much, I don't have a very big desk. The other day my 1 year old toddled into the study and started pushing the power button on my PC. This power cycled the machine a few times in quick succession. This was unknown to me until the next morning when I booted up my PC but noticed it was very sluggish. It crashed trying to open my browser. After it happened again I started digging through the logs and noticed some filesystem corruption. +My PC is a tower that I have on a small stand next to my desk. In the past I had kept the case on my desk but it is rather large and dominates the space a bit too much. The other day my 1 year old toddled into the study and started pushing the power button on my PC power cycling the machine a few times in quick succession. This was unknown to me until the next morning when I booted up my PC but noticed it was very sluggish and it crashed trying to open my browser. After it happened again I started digging through the logs and noticed some filesystem corruption. As I described in my backup setup post, I have a 3 disk RAID 5 array as my $HOME. Because of the size I only nightly backup important documents, etc. A full backup is done periodically to an external drive I keep in my bug out bag. Unfortunately I had not done a full back in a while, but I knew my nightly backups were good so nothing too important was lost. @@ -21,9 +21,9 @@ Once the RAID array was reformatted I began the data copy from my external drive This got me to a relatively good position. Okay I had lost some random downloads and a little bit of code that hadn't been pushed to my git server, but nothing serious. It is a little disappointing though, my backup setup is not good enough. -Rebuilding my whole setup to use [zfs](TK) is on my todo list, but right now I wanted a quick(er) fix without too much change. +I would like to give [zfs](https://en.wikipedia.org/wiki/ZFS){target="_blank" rel="noreferrer"} a try, or even attempt a mini [ceph](https://ceph.io/en/){target="_blank" rel="noreferrer"} setup, but that would need some planning and some equipment purchases. I need something in the interim. -I decided I needed more regular backups of my $HOME, so I needed some more storage. I purchased another external drive which now sits permanently plugged into my PC. Instead of using `dedup` again I opted for an alternative tool, in this case I went with [borg](TK){target="_blank" rel="noreferrer"}. +An external drive was purchased, which now sits permanently plugged into my PC. Instead of using `dedup` again I opted for an alternative tool, in this case I went with [BorgBackup](https://www.borgbackup.org/){target="_blank" rel="noreferrer"}. After installing `borg` I initialised a new repo and kicked off a full backup ``` @@ -39,8 +39,8 @@ When I rebooted after the second freeze my system dropped into maintenance mode, I decided to give `borg` another shot so kicked of the backup again. This time it succeeded. ``` - ──── ─ borg create -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME | tee var/borg.log ~ -Enter passphrase for key /media/backup/borg-kinakuta: + ──── ─ borg create -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME +Enter passphrase for key /media/backup/borg-kinakuta: Creating archive at "/media/backup/borg-kinakuta::20221023" ------------------------------------------------------------------------------ Repository: /media/backup/borg-kinakuta @@ -61,11 +61,11 @@ Chunk index: 1620226 2214299 ------------------------------------------------------------------------------ ``` -Nine and a half hours was quicker than I was expecting. Over the next few days I ran backups after I finished work. +Nine and a half hours was quicker than I was expecting. Over the next few days I ran backups each evening after I finished work. ``` - ──── ─ borg create -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME | tee var/borg.log ~ -Enter passphrase for key /media/backup/borg-kinakuta: + ──── ─ borg create -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME +Enter passphrase for key /media/backup/borg-kinakuta: Creating archive at "/media/backup/borg-kinakuta::20221024" ------------------------------------------------------------------------------ Repository: /media/backup/borg-kinakuta @@ -87,8 +87,8 @@ Chunk index: 1627368 4419526 ``` ``` - ──── ─ borg create -x -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME ~ -Enter passphrase for key /media/backup/borg-kinakuta: + ──── ─ borg create -x -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME +Enter passphrase for key /media/backup/borg-kinakuta: Creating archive at "/media/backup/borg-kinakuta::20221025" ------------------------------------------------------------------------------ Repository: /media/backup/borg-kinakuta @@ -129,29 +129,7 @@ Chunk index: 1647966 8540968 ------------------------------------------------------------------------------ ``` -``` - ──── ─ borg create -x -v --stats /media/backup/borg-kinakuta::$(date +%Y%m%d) $HOME ~ -Enter passphrase for key /media/backup/borg-kinakuta: -Creating archive at "/media/backup/borg-kinakuta::20221101" ------------------------------------------------------------------------------- -Repository: /media/backup/borg-kinakuta -Archive name: 20221101 -Archive fingerprint: 5693768bbed6b5e00c63c20ca66b332afc155babf8d4520d74ac9371c13a901c -Time (start): Tue, 2022-11-01 17:26:34 -Time (end): Tue, 2022-11-01 17:40:51 -Duration: 14 minutes 16.62 seconds -Number of files: 1207431 -Utilization of max. archive size: 0% ------------------------------------------------------------------------------- - Original size Compressed size Deduplicated size -This archive: 2.36 TB 2.18 TB 3.65 GB -All archives: 11.79 TB 10.91 TB 1.99 TB - - Unique chunks Total chunks -Chunk index: 1668572 10604861 ------------------------------------------------------------------------------- -``` -I am really happy with these results from `borg`. The next step is to play around with [borgmatic](TK){target="_blank" rel="noreferrer"} when I get a chance. +I am really happy with these results from `borg`. When I get chance the next step is to play around with [borgmatic](TK){target="_blank" rel="noreferrer"} to automate the backups. Another full backup will still be done to the drive in my bug out bag, I just have to be better at doing it more regularly. At least now if I need to restore I will be able to recover all of $HOME and not only the important things.