Skip to content

Instantly share code, notes, and snippets.

@125m125
125m125 / createBackup.sh
Last active March 2, 2024 00:28
Simple automatic backup with gpg asymetric encryption
#!/bin/bash
# go to working directory
echo "$(date) Preparing..."
cd /root/backup/backups
# get current date for file names (careful if you run it more than once per day
DATE=`date +%Y%m%d`
NAME=$(uname -n)-${DATE}