What's new
PGBlitz.com

Register Now! Find useful tips, Interact /w Community Members and join the part the Best Community on the Internet!

Discussion Moving and Encrypting Existing Video Files

DaWads

Full Member
Donor
PG Version
8.6.2
Mount Type
Move Encrypted
Server Type
Remote - Dedicated Server
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
 
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"

:)
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads


Development Donations

 

Top NZB NewsGroups!

Members - Up To a 58% Discount!

Trending

Online statistics

Members online
5
Guests online
126
Total visitors
131
Top