Added backup script for games
This commit is contained in:
parent
2051d545a5
commit
9c92ce024b
30
games-backup
Normal file
30
games-backup
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Show help page
|
||||
if [ "$1" = "-h" ]
|
||||
then
|
||||
echo "system-backup <option>"
|
||||
echo
|
||||
echo "If no options are specified it will use default"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo
|
||||
#echo "-d [USB Dir]"
|
||||
echo
|
||||
echo
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Initialize variables
|
||||
#backup_dir="/mnt/USB/Backup/"$(date +'%Y/%m/%d')
|
||||
backup_dir_remote="/media/backup/games/"$(date +'%Y/%m/%d')
|
||||
minecraft_dir="/media/games/bukkit"
|
||||
csgo_dir="/var/"
|
||||
remote_ip="192.168.178."
|
||||
|
||||
# Back the fuck up bro...
|
||||
sudo ssh backup@$remote_ip sudo mkdir -p $backup_dir_remote/mc mkdir $backup_dir_remote/csgo
|
||||
# copy the shit over
|
||||
sudo screen -dmS backup -t backup bash -c "rsync -Aavr --progress -e ssh $minecraft_dir backup-user@$remote_ip:$backup_dir_remote/mc;
|
||||
rsync -Aavr --progress -e ssh $csgo_dir backup-user@$remote_ip:$backup_dir_remote/csgo;
|
||||
"
|
Loading…
Reference in New Issue
Block a user