mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2025-04-20 06:27:11 +00:00
Compare commits
7 Commits
e978b6a36e
...
3347cb35e6
Author | SHA1 | Date | |
---|---|---|---|
3347cb35e6 | |||
b9ddb223e4 | |||
c45afbc817 | |||
f2095563b3 | |||
b8495afbba | |||
d1ec197dc4 | |||
9b3515d121 |
@ -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 $*
|
||||
nice -n 19 borg create --compression auto,zstd,9 --exclude-from=./exclude $1 "$2"
|
||||
}
|
||||
|
||||
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 $*
|
||||
nice -n 19 borg create --compression none --exclude-from=./exclude $1 "$2"
|
||||
}
|
||||
|
||||
function checkBackup() {
|
||||
@ -110,14 +110,13 @@ 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" "/run/media/bruno/Multimedia/Virtual\ Machines" || echo ""
|
||||
backup "$HDPath/VirtualMachines::$YEARMONTH-2" "/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
|
||||
|
4
Services/installSystemService.sh
Executable file
4
Services/installSystemService.sh
Executable file
@ -0,0 +1,4 @@
|
||||
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 "Entrei"
|
||||
exit 1
|
||||
echo "Minecraft is not running. Exiting..."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BACKUPDIR="/home/bruno/Backups/zBackup-Minecraft/backups"
|
||||
BACKUPDIR="/home/bruno/Backups/Minecraft-borg"
|
||||
SERVERDIR="/home/bruno/Apps/Minecraft"
|
||||
PUBLICDIR="$SERVERDIR/BedrockServer_Public_19132"
|
||||
SURVIVALDIR="$SERVERDIR/BedrockServer_Survival_19132"
|
||||
@ -18,7 +18,6 @@ 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'
|
||||
@ -49,7 +48,7 @@ if [[ $publicBackup ]]; then
|
||||
runPublic "say ^usave query\n"
|
||||
finishedPublic=$(tail -n 4 "$PUBLICDIR/$LogFile")
|
||||
done
|
||||
/bin/tar c "$PUBLICDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/MncftPublic"
|
||||
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftPublic" "$PUBLICDIR"
|
||||
runPublic "say ^usave resume\n"
|
||||
fi
|
||||
|
||||
@ -85,9 +84,9 @@ if [[ $otherBackup ]]; then
|
||||
finishedSurvival=$(tail -n 4 "$SURVIVALDIR/$LogFile")
|
||||
done
|
||||
|
||||
/bin/tar c "$SURVIVALDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Survival"
|
||||
/bin/tar c "$CREATIVEDIR/worlds" | zbackup --non-encrypted backup "$BACKUPDIR/$BACKUPDATE/Creative"
|
||||
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftSurvival" "$SURVIVALDIR"
|
||||
borg create --stats --compression auto,zstd,9 "$BACKUPDIR::$BACKUPDATE-MncftCreative" "$CREATIVEDIR"
|
||||
runSurvival "^u"
|
||||
runSurvival "save resume\n"
|
||||
fi
|
||||
|
||||
borg prune --keep-within=3d --keep-hourly=96 --keep-weekly=8 --keep-monthly=6 "$BACKUPDIR"
|
||||
|
@ -15,20 +15,24 @@ 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 30
|
||||
tmux resize-pane -t pmovase:0.1 -U 15
|
||||
tmux resize-pane -t pmovase:0.0 -U 35
|
||||
tmux resize-pane -t pmovase:0.1 -U 10
|
||||
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; Waiting for vagrant to start...\n'
|
||||
tmux send -t pmovase:0.2 $'clear; echo Waiting for vagrant to start...\n'
|
||||
|
||||
while [[ -z $(ping projetomovase.test -c 1 | grep "time=") ]] ; do
|
||||
sleep 1
|
||||
sleep 5
|
||||
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 $'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'
|
||||
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'
|
||||
|
||||
/bin/vscodium &
|
||||
/home/bruno/Apps/firefox/firefox-bin &
|
||||
|
Loading…
Reference in New Issue
Block a user