Don't recurse directories

This commit is contained in:
Jonathan Ervine 2020-08-17 23:25:25 +08:00
parent 76e27349df
commit e514e66c54

View File

@ -6,10 +6,10 @@ LIVE_DB=$1
BACKUP_DB=$2 BACKUP_DB=$2
echo -e 'Starting the sidecar container to periodically backup the sonarr databases' echo -e 'Starting the sidecar container to periodically backup the sonarr databases'
chown 1003:1003 /app-remote-config/* chown 1003:1003 /app-remote-config/*
echo -e 'Copy the config from the remote share to the locali drive' echo -e 'Copy the config from the remote share to the local drive'
touch /mnt/app-local-config/$LIVE_DB touch /mnt/app-local-config/$LIVE_DB
python3 /usr/local/bin/db-restore.py $BACKUP_DB $LIVE_DB python3 /usr/local/bin/db-restore.py $BACKUP_DB $LIVE_DB
find /app-remote-config/ -type -f -not -iname $BACKUP_DB -exec cp -fvp '{}' '/mnt/app-local-config/{}' ';' find /app-remote-config/ -type f -maxdepth 1 -not -iname $BACKUP_DB -exec cp -fvp '{}' '/mnt/app-local-config/{}' ';'
chown -R 1003:1003 /mnt/app-local-config chown -R 1003:1003 /mnt/app-local-config
echo -e 'Perform periodic backup of database' echo -e 'Perform periodic backup of database'
while true; do while true; do