Last active
November 16, 2020 08:57
-
-
Save ShockwaveNN/e172b717242d8f3e6b036b0c08a3b0b7 to your computer and use it in GitHub Desktop.
script for making backup of kodi settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE=$(date '+%Y-%m-%d-%H-%M-%S') | |
BACKUP_NAME=kodi-backup-$DATE.tar.gz | |
TEMP_BACKUP_LOCATION=/tmp/backups/kodi | |
BACKUP_DIR=/home/pi/.kodi | |
ARCHIVE_DIR=/media/routher_share/Backup/kodi | |
mkdir -pv $TEMP_BACKUP_LOCATION | |
chmod 777 $TEMP_BACKUP_LOCATION | |
FULL_BACKUP_NAME=$TEMP_BACKUP_LOCATION/$BACKUP_NAME | |
tar -zcvf "$FULL_BACKUP_NAME" $BACKUP_DIR | |
cp $FULL_BACKUP_NAME $ARCHIVE_DIR | |
rm $FULL_BACKUP_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment