Skip to content

Instantly share code, notes, and snippets.

@yorickdowne
yorickdowne / README.md
Last active May 5, 2024 10:47
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

This adds a mirror to an existing Ubuntu ZFS boot drive after the fact. It's been tested on Ubuntu 20.04 by me and all the way up to Ubuntu 22.10 by users in comments.

ZFS requires native encryption to be added at pool / dataset creation. Ubuntu 22.04 supports this during installation. Whether these instructions are suitable for mirroring such a setup has not been tested. For Ubuntu 20.04, these instructions are not suitable for creating an encrypted ZFS boot disk, please use the full instructions linked above for that. You can, however, add an en

@ajsharp
ajsharp / migrate-route53-dns
Last active July 3, 2023 18:35
This script makes it very easy to migrate an entire DNS zone from one AWS Route53 zone to another. This script expects you to have downloaded the old zone file via the AWS CLI to a json file called DOMAIN.zone.json. It uses the AWS CLI to perform the request, so make sure that your credentials are properly configured.
#!/usr/bin/env ruby
require 'json'
# This is the json output of the old zone, fetched using the AWS CLI.
zone = JSON.parse(File.read('DOMAIN.zone.json'))['ResourceRecordSets']
new_zone_id = 'NEW_ZONE_ID'
# We don't want to migrate the SOA and NS records from the old zone.