diff --git a/shell/scripts/backupToRemote.sh b/shell/scripts/backupToRemote.sh new file mode 100755 index 0000000..0ab5d7c --- /dev/null +++ b/shell/scripts/backupToRemote.sh @@ -0,0 +1,19 @@ +#!/bin/bash +mkdir -p /tmp/backups/$(date +"%Y%m%d") + +# Backup postgres folder +tar -zcvf /tmp/backups/$(date +"%Y%m%d")/postgres14.tar.gz /opt/mastodon/postgres14 +# Backup public folder +tar --exclude=/opt/mastodon/public/system/cache -zcvf /root/backups/$(date +"%Y%m%d")/public.tar.gz /opt/mastodon/public + +rsync -e 'ssh -p 23' --recursive /root/backups/* u302558-sub3@u302558-sub3.your-storagebox.de: + +rm -r /root/backups + +if [ $(ssh -p 23 u302558-sub3@u302558.your-storagebox.de ls | wc -l) -gt "5" ] +then + echo "More than 3 Backups, delete $(ssh -p 23 u302558-sub3@u302558.your-storagebox.de ls -t | tail -n 5 | tr '\n' ' ')" + ssh -p 23 u302558-sub3@u302558.your-storagebox.de rm -r $(ssh -p 23 u302558-sub3@u302558.your-storagebox.de ls | sort | head -n 1) +fi +# rm -r ~/backups/$(ls ~/backups/ | sort | head -n 1) +# tar --exclude=/opt/mastodon/public/system/cache -zcvf ~/$(date +"%Y%m%d")/public.tar.gz /opt/mastodon/public diff --git a/starship/starship.toml b/starship/starship.toml index 93881ba..6f0a62d 100644 --- a/starship/starship.toml +++ b/starship/starship.toml @@ -16,12 +16,12 @@ style="bold red" [[battery.display]] threshold=50 style="bold blue" -discharging_symbol=" " +discharging_symbol="󰂀 " [[battery.display]] threshold=100 style="bold blue" -discharging_symbol=" " +discharging_symbol="󰁹 " [character] format = "[=](fg:#ff218e)[=](fg:#fcd800)[=](fg:#0194fc)$symbol " @@ -45,7 +45,7 @@ style = "bold purple" symbol = " " [directory] -read_only = " " +read_only = " 󰌾" style = "bold blue" [docker_context] @@ -79,10 +79,10 @@ symbol = " " symbol = " " [memory_usage] -symbol = " " +symbol = "󰍛 " [nim] -symbol = " " +symbol = " " [nix_shell] symbol = " " @@ -91,13 +91,13 @@ symbol = " " symbol = " " [package] -symbol = " " +symbol = "󰏗 " [python] symbol = " " [rlang] -symbol = "ﳒ " +symbol = "󰟔 " [ruby] symbol = " "