uplink mail backup

This commit is contained in:
Noah Masur 2021-05-02 12:54:37 -04:00
parent c39b4538ae
commit 71cbdae52f
4 changed files with 24 additions and 1 deletions

5
bin/uplink-delete-bucket Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
bucket="$1"
access="$2"
uplink ls ${access:+--access "$access"} "sj://$bucket/" | awk '{print $NF}' | xargs -I {} uplink rm ${access:+--access "$access"} "sj://$bucket/{}"

View File

@ -17,4 +17,3 @@ brew "cjbassi/ytop/ytop" # Fancy system performance
brew "nmasur/repo/update-ssh-config" # Update .ssh/config
brew "kakoune" # Modal editor
brew "awslogs" # View AWS log streams
brew "uplink" # StorJ encrypted storage CLI

View File

@ -0,0 +1,2 @@
# Run backup of mail folder, requires rclone (and uplink, with proper setup)
@hourly root rclone sync /home/noah/Mail/ mail-backup:mail/

17
mail/backup/setup_uplink Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# First Uplink
curl -L https://github.com/storj/storj/releases/latest/download/uplink_linux_amd64.zip -o uplink_linux_amd64.zip
if ! (which unzip > /dev/null)
then
apt install -y unzip
fi
unzip -o uplink_linux_amd64.zip
rm uplink_linux_amd64.zip
chmod 755 uplink
sudo mv uplink /usr/local/bin/uplink
# Then rclone
curl https://rclone.org/install.sh | sudo bash
echo "\n\nNow setup rclone with: rclone config\n"