Earned 1 trophy in The Witcher 3: Wild Hunt
Trophies
- Fist of the South Star
Earned 1 trophy in The Witcher 3: Wild Hunt
Listened to 5 tracks
Listened to Lateralus by Tool
Listened to 12 tracks
Listened to Marilyn Manson
Listened to 5 tracks
Took me a few hours to realize that The Witcher 3 on Playstation 5 has a photo mode. Albeit limited.
Still, I should get some decent shots out of this, my first full play through of the game.
This was taken as I was walking into the abandoned village near the start, to set the Noonwraith free.
It took me way too long to work out how to actually do damage to her.
Listened to 4 tracks
Earned 2 trophies in Horizon Zero Dawn™ Remastered
Listened to 4 tracks
Listened to 4 tracks
Listened to Stained Class by Judas Priest
Listened to 34 tracks
Earned 1 trophy in Horizon Zero Dawn™ Remastered
Listened to The Black Parade by My Chemical Romance
Listened to Cruelty and the Beast by Cradle of Filth
Listened to 2 tracks
Automating backups of Docker volumes from a Linux server to Digital Ocean spaces.
Backups are a must for pretty much anything digital. And automating those backups make life so much easier for you, should you lose your data.
My own use case is to backup the data on my home server, since these are storing my music collection and my family’s photos and documents.
All of the services on my home server are installed with Docker, with all of the data in separate Docker Volumes. This means I should only need to back those folders that get mounted into the containers, since the services themselves could be easily re-deployed.
I also want this data to be encrypted, since I will be keeping both an offline local copy, as well as storing a copy in a third party cloud provider (Digital Ocean spaces).
S3cmd is a command line utility for interacting with an S3-compliant storage system.
It will enable me to send a copy of my data to my Digital Ocean Spaces account, encrypting it before hand.
The official installation instructions for s3cmd can be found on the Github repository.
For Arch Linux I used:
sudo pacman -S s3cmd
And for my home server, which is running Ubuntu Server, I installed it via Python’s package manager, “pip”:
sudo pip install s3cmd
Once installed, the first step is to run through the configuration steps with this command:
s3cmd --configure
Then answer the questions that is asks you.
You’ll need these items to complete the steps:
The other options should be fine as their default values.
Your configuration will be stored as a plain text file at ~/.s3cmd. This includes that encryption password.
Since all of the data I actually care about on my server will be in directories that get mounted into docker containers, I only need to compress and encrypt those directories for backing up.
If ever I need to re-install my server I can just start all of the fresh docker containers, then move my latest backups to the correct path on the new server.
Here is my bash script that will archive, compress and push my data to backup over to Digital Ocean spaces (encrypting it via GPG before sending it).
I have added comments above each section to try and make it more clear as to what each step is doing:
#!/usr/bin/bash
## Root directory where all my backups are kept.
basepath="/home/david/backups"
## Variables for use below.
appname="nextcloud"
volume_from="nextcloud-aio-nextcloud"
container_path="/mnt/ncdata"
## Ensure the backup folder for the service exists.
mkdir -p "$basepath"/"$appname"
## Get current timestamp for backup naming.
datetime=$(date +"%Y-%m-%d-%H-%M-%S")
## Start a new ubuntu container, mounting all the volumes from my nextcloud container
## (I use Nextcloud All in One, so my Nextcloud service is called "nextcloud-aio-nextcloud")
## Also mount the local "$basepath"/"$appname" to the ubuntu container's "/backups" path.
## Once the ubuntu container starts it will run the tar command, creating the tar archive from
## the contents of the "$container_path", which is from the Nextcloud volume I mounted with
## the --volumes-from flag.
docker run \
--rm \
--volumes-from "$volume_from" \
-v "$basepath"/"$appname":/backups \
ubuntu \
tar cvzf /backups/"$appname"-data-"$datetime".tar.gz "$container_path"
## Now I use the s3cmd command to move that newly-created
## backup tar archive to my Digital Ocean spaces.
s3cmd -e put \
"$basepath"/"$appname"/"$appname"-data-"$datetime".tar.gz \
s3://scottie/"$appname"/
Cron jobs are a way to automate any tasks you want to on a Linux system.
You can have fine-grained control over how often you want to run a task.
Although work with Linux’s cron scheduler is out of the context of this guide, I will share the setting I have for my Nextcloud backup, and a brief explanation of its configuration.
The command to edit what cron jobs are running on a Linux system, Ubuntu in my case, is:
crontab -e
This will open up a temporary file to edit, which will get written to the actual cron file when saved — provided it is syntactically correct.
This is the setting I have in mine for my Nextcloud backup (it should all be on a single line):
10 3 * * 1,4 /home/david/backup-nextcloud >> /home/david/backups/backup-nextcloud.log
The numbers and asterisks are telling cron when the given command should run:
10th minute
3rd Hour
* Day of month (not relevant here)
* Month (not relevant here)
1st,4th Day of the Week (Monday and Thursday)
So my configuration there says it will run the /home/david/backup-nextcloud command every Monday and Thursday at 3:10am. It will then pipe the command’s output into my log file for my Nextcloud backups.
Download the file from your Digital Ocean spaces account.
Go into the directory it is downloaded to and run the file command on the archive:
# For example
file nextcloud-data-2023-11-17-03-10-01.tar.gz
# You should get something like the following feedback:
nextcloud-data-2023-11-17-03-10-01.tar.gz: GPG symmetrically encrypted data (AES256 cipher)
You can decrypt the archive with the following command:
gpg --decrypt nextcloud-data-2023-11-17-03-10-01.tar.gz > nextcloud-backup.tar.gz
When you are prompted for a passphrase, enter the one you set up when configuring the s3cmd command previously.
You can now extract the archive and see your data:
tar -xzvf nextcloud-backup.tar.gz
The archive will be extracted into the current directory.
Earned 1 trophy in Red Dead Redemption 2
Earned 4 trophies in Control
Earned 2 trophies in Control
Earned 3 trophies in Virginia
Listened to 5 tracks
Listened to 39 tracks
Listened to The Midnight
Listened to 11 tracks
Listened to Debut by Björk
Listened to Dishwasher scene by Scarface
Listened to Knowing Me Knowing Yule - BBC by Alan Partridge & Mary The Virgin
Listened to 2 tracks
Listened to 12 tracks
Listened to 4 tracks
Listened to I Am the Night by Perturbator
Good job they were pretend chips. This year’s secret Santa I had a girl I’ve never met. So I got her seagalogy.
Arriva: Can’t use that(eTicket) – we’re ‘yellow’ today.
Me: Okay so what do I do? You watched me open it.
Arriva: You need to make it yellow
@aral if ever you need more examples of terrible UX, the arriva mTicket app is a good one. My super powers are diminished.
So @Linux_Mint 16 is out. So my new ssd is getting a reinstall. So long crunchbang, it wasn’t meant to be.
I wonder what today will have in store for me.
Bob Morton made a mistake… Now it’s time to erase that mistake.