Añadidos nuevos scripts
This commit is contained in:
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Variables
|
||||
NOW=$(date +"%d-%m-%Y %T")
|
||||
readonly NOW
|
||||
|
||||
BACKUP_SOURCE=/home/sergio
|
||||
readonly BACKUP_SOURCE
|
||||
|
||||
BACKUP_TARGET=/sustancia/maverick/backup
|
||||
readonly BACKUP_TARGET
|
||||
|
||||
LOG="${BACKUP_SOURCE}"/cronjobs/backup_maverick.log
|
||||
readonly LOG
|
||||
|
||||
## Mount all
|
||||
mount -a
|
||||
|
||||
## Start backup
|
||||
printf "\n\nBACKUP (%s)\n" "${NOW}" | tee "${LOG}"
|
||||
|
||||
## Backup system files
|
||||
printf "\n\n>> BACKUP SYSTEM FILES\n" | tee "${LOG}"
|
||||
rsync -avh --delete /etc/crontab "${BACKUP_TARGET}" | tee "${LOG}"
|
||||
rsync -avh --delete /etc/fstab "${BACKUP_TARGET}" | tee "${LOG}"
|
||||
|
||||
## Backup files
|
||||
FILES=".gitconfig .git-credentials"
|
||||
for FILE in $FILES; do
|
||||
printf "\n\n>> BACKUP FILES\n" | tee "${LOG}"
|
||||
if [ -f "${BACKUP_SOURCE}"/"${FILE}" ]; then
|
||||
rsync -avh --delete "${BACKUP_SOURCE}"/"${FILE}" "${BACKUP_TARGET}" | tee "${LOG}"
|
||||
fi
|
||||
done
|
||||
|
||||
## Backup folders
|
||||
FOLDERS="cronjobs docs rgbpi .skyscraper .ssh"
|
||||
for FOLDER in $FOLDERS; do
|
||||
if [ -d "${BACKUP_SOURCE}"/"${FOLDER}" ]; then
|
||||
printf "\n\n>> BACKUP %s\n" "${FOLDER}" | tee "${LOG}"
|
||||
rsync -avh --delete "${BACKUP_SOURCE}"/"${FOLDER}" "${BACKUP_TARGET}"/"${FOLDER}" | tee "${LOG}"
|
||||
fi
|
||||
done
|
||||
|
||||
## Backup docker
|
||||
FOLDER=docker
|
||||
if [ -d "${BACKUP_SOURCE}"/"${FOLDER}" ]; then
|
||||
printf "\n\n>> BACKUP %s\n" "${FOLDER}" | tee "${LOG}"
|
||||
docker stop "$(docker ps -q)"
|
||||
rsync -avh --delete "${BACKUP_SOURCE}"/"${FOLDER}" "${BACKUP_TARGET}"/"${FOLDER}" | tee "${LOG}"
|
||||
docker start "$(docker ps -a -q)"
|
||||
fi
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
#sony.europe
|
||||
find ~/downloads/psx/europe -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/europe/ \;
|
||||
|
||||
#sony.usa
|
||||
find ~/downloads/psx/usa -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/usa/ \;
|
||||
|
||||
#sony.japan
|
||||
find ~/downloads/psx/japan -type f -iname "*.chd" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ \(2020-10-05\)\ \(Redump\)\ \(CHD\)/japan/ \;
|
||||
|
||||
#sony.psp
|
||||
find ~/downloads/psp -type f -iname "*.zip" -mtime +0 -exec mv -v {} ~/chd/Sony\ -\ PlayStation\ Portable\ \(2022-03-21\)\ \(Redump\)/ \;
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Esta script copia las carpetas y ficheros necesarios desde skraper a es-de
|
||||
|
||||
ES_DE_FOLDER="/sustancia/downloads/es-de/"
|
||||
readonly ES_DE_FOLDER
|
||||
|
||||
Reference in New Issue
Block a user