mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2025-04-20 09:57:12 +00:00
Compare commits
No commits in common. "3347cb35e6338034ba9d3dabf30432f02f78c7da" and "e978b6a36e2dc89a12fd935689c62cac664bf25c" have entirely different histories.
3347cb35e6
...
e978b6a36e
@ -4,7 +4,7 @@ function backup () {
|
||||
|
||||
#--stats = show stats at end
|
||||
#--progress = show each file being processed
|
||||
nice -n 19 borg create --compression auto,zstd,9 --exclude-from=./exclude $1 "$2"
|
||||
nice -n 19 borg create --compression auto,zstd,9 --exclude-from=./exclude $*
|
||||
}
|
||||
|
||||
function backupNoCompression () {
|
||||
@ -13,7 +13,7 @@ function backupNoCompression () {
|
||||
|
||||
#--stats = show stats at end
|
||||
#--progress = show each file being processed
|
||||
nice -n 19 borg create --compression none --exclude-from=./exclude $1 "$2"
|
||||
nice -n 19 borg create --compression none --exclude-from=./exclude $*
|
||||
}
|
||||
|
||||
function checkBackup() {
|
||||
@ -110,13 +110,14 @@ backupNoCompression "$HDPath/Videos::$YEARMONTH" "/run/media/bruno/Multimedia/Vi
|
||||
checkBackup "$HDPath/Videos/"
|
||||
|
||||
echo -e "\e[97m`date +%r` - Copying Virtual Machines folder (7/7)...\e[39m"
|
||||
backup "$HDPath/VirtualMachines::$YEARMONTH-2" "/run/media/bruno/Multimedia/Virtual Machines" || echo ""
|
||||
backup "$HDPath/VirtualMachines::$YEARMONTH" "/run/media/bruno/Multimedia/Virtual\ Machines" || echo ""
|
||||
checkBackup "$HDPath/VirtualMachines/"
|
||||
|
||||
# Show result
|
||||
echo -e "\e[97m`date +%r` - Backup finished. Please, verify your log files.\e[39m"
|
||||
|
||||
echo "$ActiveDisk" > .lastDisk
|
||||
echo "$ActiveBackupSet" > ".lastBackupSetDisk_$lastDisk"
|
||||
|
||||
kdialog --title "Backup Complete" --msgbox "Backup finished successfully"
|
||||
echo
|
||||
|
@ -1,4 +0,0 @@
|
||||
doas rm /etc/systemd/system/$1
|
||||
doas cp -f $1 /etc/systemd/system/
|
||||
doas systemctl daemon-reload
|
||||
doas systemctl status $1
|
@ -6,11 +6,11 @@ if screen -list | grep -q "Minecraft"; then
|
||||
fi
|
||||
|
||||
if [[ -z $publicBackup && -z $otherBackup ]] ; then
|
||||
echo "Minecraft is not running. Exiting..."
|
||||
exit 0
|
||||
echo "Entrei"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BACKUPDIR="/home/bruno/Backups/Minecraft-borg"
|
||||
BACKUPDIR="/home/bruno/Backups/zBackup-Minecraft/backups"
|
||||
SERVERDIR="/home/bruno/Apps/Minecraft"
|
||||
PUBLICDIR="$SERVERDIR/BedrockServer_Public_19132"
|
||||
SURVIVALDIR="$SERVERDIR/BedrockServer_Survival_19132"
|
||||
@ -18,6 +18,7 @@ CREATIVEDIR="$SERVERDIR/BedrockServer_Creative_19134"
|
||||
LogFile="log.txt"
|
||||
|
||||
BACKUPDATE=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||
mkdir "$BACKUPDIR/$BACKUPDATE"
|
||||
|
||||
alias run='screen -S Minecraft -X'
|
||||
alias runSurvival='run at Survival stuff'
|
||||
@ -48,7 +49,7 @@ if [[ $publicBackup ]]; then
|
||||
runPublic "say ^usave query\n"
|
||||
finishedPublic=$(tail -n 4 "$PUBLICDIR/$LogFile")
|
||||
done
|
||||
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftPublic" "$PUBLICDIR"
|
||||
/bin/tar c "$PUBLICDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/MncftPublic"
|
||||
runPublic "say ^usave resume\n"
|
||||
fi
|
||||
|
||||
@ -84,9 +85,9 @@ if [[ $otherBackup ]]; then
|
||||
finishedSurvival=$(tail -n 4 "$SURVIVALDIR/$LogFile")
|
||||
done
|
||||
|
||||
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftSurvival" "$SURVIVALDIR"
|
||||
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftCreative" "$CREATIVEDIR"
|
||||
/bin/tar c "$SURVIVALDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Survival"
|
||||
/bin/tar c "$CREATIVEDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Creative"
|
||||
runSurvival "^u"
|
||||
runSurvival "save resume\n"
|
||||
fi
|
||||
borg prune --keep-within=3d --keep-hourly=96 --keep-weekly=8 --keep-monthly=6 "$BACKUPDIR"
|
||||
|
||||
|
@ -15,24 +15,20 @@ tmux splitw -h -t pmovase:0.1
|
||||
|
||||
terminator -T PMova-se -b --geometry=627x927 -x tmux a -t pmovase &
|
||||
|
||||
tmux resize-pane -t pmovase:0.0 -U 35
|
||||
tmux resize-pane -t pmovase:0.1 -U 10
|
||||
tmux resize-pane -t pmovase:0.0 -U 30
|
||||
tmux resize-pane -t pmovase:0.1 -U 15
|
||||
tmux resize-pane -t pmovase:0.4 -U 10
|
||||
|
||||
tmux send -t pmovase:0.0 $'npm run vagrant; npm run watch\n'
|
||||
tmux send -t pmovase:0.2 $'clear; echo Waiting for vagrant to start...\n'
|
||||
tmux send -t pmovase:0.2 $'clear; Waiting for vagrant to start...\n'
|
||||
|
||||
while [[ -z $(ping projetomovase.test -c 1 | grep "time=") ]] ; do
|
||||
sleep 5
|
||||
sleep 1
|
||||
done
|
||||
sleep 10
|
||||
|
||||
tmux send -t pmovase:0.1 $'npm run cypress:open\n'
|
||||
tmux send -t pmovase:0.1 $'npm run test-watch\n'
|
||||
tmux send -t pmovase:0.2 $'^u'
|
||||
tmux send -t pmovase:0.2 $'npm run test-php-watch\n'
|
||||
tmux send -t pmovase:0.3 $'npm run ssh\n'
|
||||
tmux send -t pmovase:0.4 $'alias clear=\'clear;figlet PMova-se\';clear\n'
|
||||
tmux send -t pmovase:0.2 $'phpunit-watcher watch\n'
|
||||
tmux send -t pmovase:0.3 $'ssh homestead -t \"cd code;alias clear='clear; figlet Vagrant';clear;bash --login\"\n'
|
||||
tmux send -t pmovase:0.4 $'alias clear='clear;figlet PMova-se';clear\n'
|
||||
|
||||
/bin/vscodium &
|
||||
/home/bruno/Apps/firefox/firefox-bin &
|
||||
|
Loading…
Reference in New Issue
Block a user