Due to the way TrueNAS is built-duplicating files using Rsync requires some special flags to allow it to work
The below example command has been used and verified as working with TrueNAS Scale
rsync -avrh -A --no-perms <SOURCE> <DESTINATION>
Background: In an effort to streamline my local network and reduce the number of dedicated devices, I began an effort to move off of my Unifi Cloudkey Gen 1 to a Docker Container. While the migration should be straight forward-it is definitely not!
Before we begin, ensure that your existing Cloudkey is still connected to the network and operational. This is crucial to migrate the existing settings and to leverage the Unifi migration tooling for a site to save on having to wipe your configuration and rebuild everything from scratch.
System Settings
and then clicking on Shell
lsblk
commandblockdev --getbsz /dev/<YOUR BLOCK DEVICE ID>
tmux new -s badblocks_
growpart
command, ie. sudo growpart /dev/vda 2
resize2fs
command, ie. sudo resize2fs /dev/vda2
#!/usr/bin/env bash | |
# Download the binary | |
sudo curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-aarch64 \ | |
-o /usr/local/lib/docker/cli-plugins/ | |
# Set the binary to be executable | |
chmod +x /usr/local/lib/docker/cli-plugins/docker-compose |
#!/usr/bin/env bash | |
# Install Dependencies | |
sudo apt-get update && sudo apt-get install software-properties-common wget -y | |
# Add the gpg key | |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
# Add the repository and set where the key is to validate the packages | |
echo 'deb [arch=arm64 signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main' | sudo tee /etc/apt/sources.list.d/hashicorp.list |
Python for Windows is really easy to install-but what if you had started in the world of MacOS/*nix OSes and miss that single command to call Python or Pip? What if you don't have access to modify your environment PATH?
Windows PowerShell has a feature called "Profiles" which allows you to configure your PowerShell in a similar fashion as you could with Bash, Zsh, etc.
Pretty cool huh?
#!/bin/bash | |
# Bash script to check if rbenv is installed along with a few necessities and if they don't exist | |
# to install them | |
TEST_RUBY_VERSION="2.6.3" | |
install_rbenv() { | |
echo "--- :construction: Installing Rbenv" | |
# Clone rbenv from Github | |
git clone https://github.com/rbenv/rbenv.git "$HOME/.rbenv" > /dev/null 2>&1 |