Discussion - Moving and Encrypting Existing Video Files | PlexGuide.com

Discussion Moving and Encrypting Existing Video Files

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

DaWads

Active
Original poster
Donor
Jan 25, 2019
34
23
Hi everyone. So I have PGBlitz working well with Movies and TV keeping everything added encrypted to the Google Team Drive.

My problem -In the old world I also had a library marked 'Trainings' which I would mount in Plex to allow me to watch Educational videos etc.

I have the Training and YouTube Downloads on my local drive - I would like to get the Files onto the Google Team Drive encrypted in the same way the rest of my files reside there.

Can anyone help me with some advice on how to achieve this?
 
M

MrDoob

Guest
Upload the files to.your server.

sudo mkdir /mnt/privatevideos/
chown -cR 1000:1000 /mnt/privatevideos

>>>><<<<<

sudo mkdir /mnt/scripte/
chown -cR 1000:1000 /mnt/scripte

sudo nano copyto.sh

Paste the lines below and follow the rest :)

Bash:
#!/bin/bash

while [ 1 ]; do

rm /var/plexguide/moveto.log

echo "" >> /var/plexguide/moveto.log
echo "----------------------------" >> /var/plexguide/moveto.log
echo "PG Copyto - First Startup" >> /var/plexguide/moveto.log

  rclone moveto "/mnt/privatvideos/" "/mnt/move/privatvideos/" \  --log-file=/var/plexguide/moveto.log \
  --log-level INFO --stats 5s --stats-file-name-length 0 \
  --transfers 6 \
  --min-age 2h \
  --use-server-modtime

  sleep 30

#Function
AC=find
EP=-empty

moveto.log
$AC /mnt/privatvideos/ -mindepth 2 -type d $EP -exec rmdir \{} \; >> /var/plexguide/moveto.log
$AC /mnt/privatvideos/ -mindepth 2 -type d $EP -exec rmdir \{} \; >> /var/plexguide/moveto.log

chmod -R 775 /mnt/privatvideos
chown -cR 1000:1000 /mnt/privatvideos

rm -rf /var/plexguide/moveto.log >> /var/plexguide/moveto.log
echo "" >> /var/plexguide/moveto.log
echo "log cleaned" >> /var/plexguide/moveto.log
echo "" >> /var/plexguide/moveto.log
echo "all done | sleep for 2h" >> /var/plexguide/moveto.log
echo "" >> /var/plexguide/moveto.log
echo "finished @ $(date)"  >> /var/plexguide/moveto.log

  sleep 2h

done

how to run this as a service ^^

so here we go

Code:
cd /etc/systemd/system  && cp pgblitz.service copyto.service
Code:
nano copyto.service
Bash:
[Service]
User=0
Group=0
Type=simple
ExecStart=/bin/bash /mnt/scripte/copyto.sh
KillMode=process

[Install]
WantedBy=multi-user.target
and at last


service copyto start
service copyto status
 
  • Like
Reactions: 1 user
M

MrDoob

Guest
All files older as 2h are catched and uploaded to your G/TDrive || over PGBlitz.


If you want an other folder as "privatvideos"

Chang it simple !

Thata only a sample the folder "privatvideoa"

:)
 
  • Love
Reactions: 1 user

Recommend NewsGroups

      Up To a 58% Discount!

Trending