mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-24 05:24:56 +00:00
Compare commits
4 Commits
8fe43eb404
...
b926a7c2b4
Author | SHA1 | Date | |
---|---|---|---|
b926a7c2b4 | |||
1be27fff16 | |||
bfd0749b11 | |||
9d973a0305 |
@ -20,7 +20,7 @@ set -e
|
|||||||
|
|
||||||
s -v
|
s -v
|
||||||
bold "Updating..."
|
bold "Updating..."
|
||||||
yay -Syu --sudoloop --noconfirm --nobatchinstall --cleanafter
|
yay -Syu --sudoloop --answerclean none --answerdiff all --answerupgrade none --noremovemake --nobatchinstall --cleanafter]]
|
||||||
|
|
||||||
bold "Cleaning stuff..."
|
bold "Cleaning stuff..."
|
||||||
s -v
|
s -v
|
||||||
|
@ -12,20 +12,27 @@ fi
|
|||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
# Backup Contabo
|
# Backup Contabo
|
||||||
/bin/rsync --archive --exclude "files/nextcloud*" --rsh=ssh backupContabo:/home/bruno/backups/* $CONTABO_BACKUP_PATH
|
/bin/rsync --archive --backup --exclude "files/nextcloud*" --rsh=ssh backupContabo:/home/bruno/backups/* $CONTABO_BACKUP_PATH
|
||||||
|
|
||||||
# Backup OXO
|
|
||||||
/bin/rsync --archive --rsh=ssh oxo:~/OXOwebsiteBackup.tar.gz ~/Backups/OXOwebsite/`date '+%Y-%m-%d'`_OXOwebsiteBackup.tar.gz
|
|
||||||
|
|
||||||
# Backup Gitea
|
# Backup Gitea
|
||||||
/bin/rsync --archive --rsh=ssh googlemicro:~/ttt/*.zip ~/Backups/gitea/`date '+%Y-%m-%d'`_gitea.zip
|
/bin/rsync --archive --backup --rsh=ssh bkpgitea:~/ttt/* ~/Backups/gitea/
|
||||||
|
|
||||||
|
# Backup OXO Files
|
||||||
|
/bin/rsync --archive --backup --rsh=ssh oxo:~/public_html ~/Backups/OXOwebsite/
|
||||||
|
tar cfz ~/Backups/OXOwebsite/`date '+%Y-%m-%d'`_OXOwebsiteBackup.tar.gz ~/Backups/OXOwebsite/public_html/
|
||||||
|
rm -rf ~/Backups/OXOwebsite/public_html/
|
||||||
|
|
||||||
|
# Backup OXO DB
|
||||||
|
ssh oxo ./backupDB.sh
|
||||||
|
/bin/rsync --archive --backup --compress --rsh=ssh oxo:~/db/* ~/Backups/OXOwebsite/
|
||||||
|
ssh oxo rm ./db/*
|
||||||
|
|
||||||
# Delete old backups
|
# Delete old backups
|
||||||
find $CONTABO_BACKUP_PATH/db -type f -name "*.sql.gz" -mtime +15 -delete
|
find $CONTABO_BACKUP_PATH/db -type f -name "*.sql.gz" -mtime +15 -delete
|
||||||
find $CONTABO_BACKUP_PATH/keys -type f -name "*.*" -mtime +15 -delete
|
find $CONTABO_BACKUP_PATH/keys -type f -name "*.*" -mtime +15 -delete
|
||||||
find $CONTABO_BACKUP_PATH/files -type f -name "*.*" -mtime +35 -delete
|
find $CONTABO_BACKUP_PATH/files -type f -name "*.*" -mtime +35 -delete
|
||||||
find $CONTABO_BACKUP_PATH/mail -type f -name "*.*" -mtime +20 -delete
|
find $CONTABO_BACKUP_PATH/mail -type f -name "*.*" -mtime +20 -delete
|
||||||
|
|
||||||
find $CONTABO_BACKUP_PATH/ -type f -name "*.*" -mtime +120 -delete
|
find $CONTABO_BACKUP_PATH/ -type f -name "*.*" -mtime +120 -delete
|
||||||
|
|
||||||
find ~/Backups/OXOwebsite/ -type f -name "*.sql.gz" -mtime +15 -delete
|
find ~/Backups/OXOwebsite/ -type f -name "*.gz" -mtime +15 -delete
|
||||||
|
find ~/Backups/gitea/ -type f -name "*.zip" -mtime +15 -delete
|
||||||
|
7
Services/mbsync.service
Normal file
7
Services/mbsync.service
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mailbox synchronization service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/mbsync -Va
|
||||||
|
ExecStartPost=/home/bruno/dotfiles/mutt/notmuch-hook.sh
|
10
Services/mbsync.timer
Normal file
10
Services/mbsync.timer
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Mailbox synchronization timer
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=2m
|
||||||
|
OnUnitActiveSec=5m
|
||||||
|
Unit=mbsync.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
@ -38,7 +38,7 @@ tmux rename-window -t dashboard:2 gomuks
|
|||||||
# 3 - NeoMutt
|
# 3 - NeoMutt
|
||||||
tmux new-window -t dashboard
|
tmux new-window -t dashboard
|
||||||
sleep 1
|
sleep 1
|
||||||
tmux send -t dashboard:3.0 $'neomutt\n'
|
tmux send -t dashboard:3.0 $'sleep 120 && neomutt\n'
|
||||||
tmux rename-window -t dashboard:3 neomutt
|
tmux rename-window -t dashboard:3 neomutt
|
||||||
|
|
||||||
# 4 - Joplin
|
# 4 - Joplin
|
||||||
|
Loading…
Reference in New Issue
Block a user