diff --git a/bin/uplink-delete-bucket b/bin/uplink-delete-bucket new file mode 100755 index 0000000..e742620 --- /dev/null +++ b/bin/uplink-delete-bucket @@ -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/{}" diff --git a/homebrew/learning.Brewfile b/homebrew/learning.Brewfile index 928a1b0..82946ef 100644 --- a/homebrew/learning.Brewfile +++ b/homebrew/learning.Brewfile @@ -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 diff --git a/mail/backup/rclone.cronjob b/mail/backup/rclone.cronjob new file mode 100644 index 0000000..c98c8b7 --- /dev/null +++ b/mail/backup/rclone.cronjob @@ -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/ diff --git a/mail/backup/setup_uplink b/mail/backup/setup_uplink new file mode 100755 index 0000000..b5a61e0 --- /dev/null +++ b/mail/backup/setup_uplink @@ -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"