Description | Command |
---|---|
Start a new session with session name | screen -S <session_name> |
List running sessions / screens | screen -ls |
Attach to a running session | screen -x |
Attach to a running session with name | screen -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is just a cheat sheet: | |
# On production | |
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
# On local | |
scp -C production:~/database.sql.gz | |
dropdb database && createdb database | |
gunzip < database.sql.gz | psql database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zfs list -t snapshot -H -o name | grep "201509[0-9].*" | xargs -n1 echo | |
# zfs list -t snapshot -H -o name | grep "201509[0-9].*" | xargs -n1 zfs destroy | |
zfs list -r -t snapshot -o name BusinessData/Strato-varwww | grep "2024-07" | xargs -n1 echo | |
zfs list -r -t snapshot -o name BusinessData/Strato-varwww | grep "2024-07" | xargs -n1 zfs destroy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For TrueNAS SCALE Only | |
sed -i 's/auth.generate_token",\[300/auth.generate_token",\[14400/g' /usr/share/truenas/webui/*.js | |
For TrueNAS CORE Only | |
sed -ie 's/auth.generate_token",\[300/auth.generate_token",\[14400/g' /usr/local/www/webui/*.js | |
#14400 = 4h | |
#129600 = 36h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Proxmox VE Installation on Hetzner Server via Rescue System | |
Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE. | |
In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps: | |
### Starting the Rescue System | |
1. Log into the Hetzner Robot. | |
2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for use with cron, eg: | |
# 0 3 * * * postgres /var/db/db_backup.sh foo_db | |
if [[ -z "$1" ]]; then | |
echo "Usage: $0 <db_name> [pg_dump args]" | |
exit 1 | |
fi |