#!/bin/sh # # ssh apollo sudo tar czf - --exclude=/var/jspwiki/logs --exclude=/usr/local/tomcat/logs --exclude=/usr/local/tomcat/work --exclude=/usr/local/tomcat/temp /home/ubuntu /etc /var/jspwiki /usr/local > /tmp/backup-apollo.tar # encrypted copy to my NAS: echo 'get gpg key from bitwarden' | gpg --passphrase-fd 0 --batch -co /Volumes/metskes/data/backup-apollo.tar.gpg /tmp/backup-apollo.tar # upload to STACK (no more): sftp metskem@metskem@metskem.stackstorage.com <<< $'put /Users/metskem/Downloads/backup-apollo-rest.tar.gpg' rm /Users/metskem/Downloads/backup-apollo-rest.tar.gpg /Users/metskem/Downloads/backup-apollo-rest.tar
This is a backup from my MacBook to my NAS.
Make sure the NAS is mounted on /Volumes. (Mac finder, Connect to server, or use Cmd-K)
The actual backup command from MacBook
cd # start in home dir tar -czf /tmp/mac-backup.tar .cf .ssh .flyrc .zsh_history .zshrc .aws .credhub .oh-my-zsh .gitconfig Pictures .bashrc .bash_history Documents workspace Downloads go/src # encrypted copy to my NAS: echo 'get gpg key from bitwarden' | gpg --passphrase-fd 0 --batch -co /Volumes/metskes/data/mac-backup.tar.gpg /tmp/mac-backup.tar # no more copy to stack: echo 'get gpg key from bitwarden' | gpg --passphrase-fd 0 --batch -co /tmp/mac-backup.tar.gpg /tmp/mac-backup.tar # upload to STACK: sftp metskem@metskem@metskem.stackstorage.com <<< $'put /tmp/mac-backup.tar.gpg' rm /tmp/mac-backup.tar.gpg /tmp/mac-backup.tar
Checkout the actual contents of transip stack here https://metskem.stackstorage.com/files
Unmount external disk:
umount /mnt/seagate