This commit is contained in:
2018-11-19 08:51:36 +01:00
parent bd7e951288
commit 9cfc3aba75
5 changed files with 41 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
FROM plexinc/pms-docker FROM plexinc/pms-docker
COPY root /
ENTRYPOINT ["/init"] ENTRYPOINT ["/init"]

17
docker-compose.yml Normal file
View File

@@ -0,0 +1,17 @@
version: '2'
plex:
image: kilhaasi/pms
container_name: pms
depends_on:
- plexdrv
volumes:
- /Video:/Video:shared
- /Transcode:/Transcode
- /Docker/Plex-Video/plex_cfg:/config
- /root/.rclone.conf:/root/.rclone.conf:RO
environment:
- TZ=DE
- BACKUP=gdrive:/Backup/pms.tar.gz
ports:
- 32400:32400

View File

@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
# Creating a backup of plex configuration
cd /config
tar -cvzf /pms.tar.gz Library
rclone move /pms.tar.gz $BACKUP --verbose --transfers 4 --checkers 20 --stats 10s

Binary file not shown.

View File

@@ -0,0 +1,15 @@
#!/usr/bin/with-contenv bash
# Check, if a configuration directory exists
if [[ -d /config/Library ]]
then
echo "Configuration found, skipping restore of backup"
else
if rclone ls $BACKUP
then
echo "No configuration found, restoring backup..."
rclone copy $BACKUP /plexrestore --verbose --transfers 4 --checkers 20 --stats 10s
cd /config
tar -xvzf /plexrestore/*
fi
fi