Backup laptop and Pi#
Pi backup (run from MacBook)#
#!/bin/sh # # ssh pi@apollo sudo tar cf - /appl/piwigo/config/www/gallery/galleries > /Users/metskem/Downloads/backup-apollo-fotos.tar ssh pi@apollo sudo tar czf - --exclude=/var/jspwiki/logs --exclude=/usr/local/tomcat/logs --exclude=/usr/local/tomcat/work --exclude=/usr/local/tomcat/temp /home/pi /etc /var/jspwiki /usr/local > /Users/metskem/Downloads/backup-apollo-rest.tar # encrypt: echo 'get gpg key from bitwarden' | gpg --passphrase-fd 0 --batch -co /Users/metskem/Downloads/backup-apollo-rest.tar.gpg /Users/metskem/Downloads/backup-apollo-rest.tar # upload to STACK: sftp metskem@metskem@metskem.stackstorage.com <<< $'put /Users/metskem/Downloads/backup-apollo-rest.tar.gpg'
Laptop backup#
This is a backup from my MacBook to the external disk attached to my Pi.
Make sure the external disk is plugged and mounted.
mount /dev/sda1 /mnt/seagate
The actual backup command from MacBook
cd # start in home dir rsync -a .cf .ssh .gnupg .flyrc .zsh_history .zshrc .aws .credhub .oh-my-zsh .git-credentials .gitconfig Pictures .zoomus .bashrc .bash_history Documents workspace Downloads go apollo:/mnt/seagate/harry/athena
Checkout the actual contents of transip stack here https://metskem.stackstorage.com/files
Unmount external disk:
umount /mnt/seagate
