First public build
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
type = drive
|
||||
client_id = 128201014754-taqknehjoujjrprr2jp22sr2hr67tj4p.apps.googleusercontent.com
|
||||
client_secret = HFJbDGbf61Yf0WAi_HyKw7Bg
|
||||
token = {"access_token":"ya29.GlxZBn5NX50H2v8QcDq5f1dnEyWDbHiZVlFd35KFuzS9bTefdHn54hqtH2S2xbbT8MgPFpHUUCwopLFneCbm7IsIRpqypA9CwLjNJW7Rl4wlPfnrk78RLSdfVT2QpA","token_type":"Bearer","refresh_token":"1/jjCubK4AGGU56INS9yeh2fMCQ8SCPNbltgJXw_ccTHc","expiry":"2018-11-19T08:47:56.315304763+01:00"}
|
||||
token = {"access_token":"ya29.GlxZBqnc63MH4ojPptjnXexZ4hkfcekjbV2BQNleOAsskVK6GpoHCykTtibiDxVhaR_o1jqyZrhtxhiYKevC98ByZbZXngl2eCQE41cS4BD7-CCjDyeylc4BHJw2dA","token_type":"Bearer","refresh_token":"1/jjCubK4AGGU56INS9yeh2fMCQ8SCPNbltgJXw_ccTHc","expiry":"2018-11-19T12:42:40.171077114Z"}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
FROM plexinc/pms-docker
|
||||
COPY root /
|
||||
|
||||
RUN apt update && apt install -y cron
|
||||
|
||||
ENTRYPOINT ["/init"]
|
||||
|
||||
@@ -13,6 +13,8 @@ services:
|
||||
- ./.rclone.conf:/root/.rclone.conf
|
||||
environment:
|
||||
- TZ=DE
|
||||
- BACKUP=gdrive:/Backup/pms.tar.gz
|
||||
- BACKUP=gdrive:/Backup/Plex-Dev
|
||||
- CRON=4
|
||||
- PLEX_CLAIM=claim-z3PqezuUozjYLvv7LakC
|
||||
ports:
|
||||
- 32400:32400
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# Creating a backup of plex configuration
|
||||
# Remove crontab
|
||||
|
||||
crontab -r
|
||||
|
||||
cd /config
|
||||
tar -cvzf /pms.tar.gz Library
|
||||
|
||||
rclone move /pms.tar.gz $BACKUP --verbose --transfers 4 --checkers 20 --stats 10s
|
||||
|
||||
@@ -13,3 +13,6 @@ else
|
||||
tar -xvzf /pms.tar.gz
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "0 $CRON * * * /root/bin/backup-pms" > /root/crontab.txt
|
||||
crontab /root/crontab.txt
|
||||
|
||||
8
root/root/bin/backup-pms
Executable file
8
root/root/bin/backup-pms
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# Creates a backup of Plex configuration library and pushes it to the backup repo
|
||||
#
|
||||
cd /config
|
||||
tar -cvzf /pms.tar.gz Library
|
||||
|
||||
rclone move /pms.tar.gz $BACKUP --verbose --transfers 4 --checkers 20 --stats 10s
|
||||
|
||||
24
test
Normal file
24
test
Normal file
@@ -0,0 +1,24 @@
|
||||
# Edit this file to introduce tasks to be run by cron.
|
||||
#
|
||||
# Each task to run has to be defined through a single line
|
||||
# indicating with different fields when the task will be run
|
||||
# and what command to run for the task
|
||||
#
|
||||
# To define the time you can provide concrete values for
|
||||
# minute (m), hour (h), day of month (dom), month (mon),
|
||||
# and day of week (dow) or use '*' in these fields (for 'any').#
|
||||
# Notice that tasks will be started based on the cron's system
|
||||
# daemon's notion of time and timezones.
|
||||
#
|
||||
# Output of the crontab jobs (including errors) is sent through
|
||||
# email to the user the crontab file belongs to (unless redirected).
|
||||
#
|
||||
# For example, you can run a backup of all your user accounts
|
||||
# at 5 a.m every week with:
|
||||
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
|
||||
#
|
||||
# For more information see the manual pages of crontab(5) and cron(8)
|
||||
#
|
||||
# m h dom mon dow command
|
||||
|
||||
0 2 * * * test
|
||||
Reference in New Issue
Block a user