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 cp files from old server

m4ff3w

Blitz 3rd Class
Donor
Donor
PG Version
8.5.8
Mount Type
Blitz Encrypted
Server Type
Local - Dedicated Server
Hey yall. First off, massive thanks and props to the whole PGBlitz/Plexguide team! This shiz is awesome.

I lost 32TB of media last year when my raid controller and/or backplane died. I'm now back up to >22TB and currently pushing that to a encrypted team drive @ 93MB/s (I love Google Fiber)

I'm coping /mnt/old_windows_share/Films/* to /mnt/move/Movies

I'd like to be able to do a do a cp -rvn /mnt/old_windows_share/Films/* /mnt/unionfs/Movies

Would that work? Based on my understand of <https://github.com/PGBlitz/PGBlitz.com/wiki/Data-Flow> it should. But I want to make sure I won't break anything

Thanks!
 
M

MrDoob

Guest
Basically yes .
But do you use "pgmove" (.gdrive ) or "pgblitz" (tdrive)
Edit ...

But dont copt the first directly to
/mnt/unionfs/{name.of.folder}
 
Last edited by a moderator:
M

MrDoob

Guest
Or use this way

1 .) sudo mkdir /mnt/scripte
2.) cd /mnt/scripte && nano copyto.sh
3.) sudo chown -cR 1000:1000 /mnt/scripte && sudo chmod -R 755 /mnt/scripte
4.) Past 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 Blitz Log - First Startup" >> /var/plexguide/moveto.log


  rclone moveto "/mnt/old_windows_share/Films/" "/mnt/move/Movies/" \  --log-file=/var/plexguide/moveto.log \
  --log-level INFO --stats 5s --stats-file-name-length 0 \
  --transfers 6 \
  --max-size 300G\
  --checkers 8 \
  --ignore-existing \
  --exclude="**_HIDDEN~" --exclude=".unionfs/**" \
  --exclude='**partial~' --exclude=".unionfs-fuse/**" \
  --exclude=".fuse_hidden**" \
  --exclude="**sabnzbd**" --exclude="**nzbget**" \
  --exclude="**qbittorrent**" --exclude="**rutorrent**" \
  --exclude="**deluge**" --exclude="**transmission**" \
  --exclude="**jdownloader**" --exclude="**makemkv**" \
  --exclude="**handbrake**" --exclude="**bazarr**" \
  --exclude="**ignore**"  --exclude="**inProgress**"

echo "Cycle  - Sleeping for 30 seconds " >> /var/plexguide/moveto.log
  cat /var/plexguide/moveto.log | tail -200 > cat /var/plexguide/moveto.log
  #sed -i -e "/Duplicate directory found in destination/d" /mnt/log/moveto.log

  sleep 3h

done
~~

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
sudo service copyto start
sudo service copyto status

The rest made the script for you
 
Last edited by a moderator:
M

MrDoob

Guest
If you want a copy of the files change this line only


Code:
rclone moveto
to
Code:
rclone copyto
 

T-MAN

Blitz Noob
Hello all... new here but have been lurking around for several days. Have setup pgblitz on a Hetzner dedicated server and it’s freakin awesome. Great work guys.

I have a question... I have a separate rclone mount of another cloud drive and I used the script above to copy files over from the original cloud source mount to /mnt/move similar to as mentioned above. But I am trying to understand why I should be pointing my copyto destination to /mnt/move and not /mnt/unionfs. If I point it to /mnt/move, won’t the files that finish uploading to tdrive be removed from the /mnt/move folder and then rclone copies the same folders and files again to /mnt/move as they are no longer there and we have an ongoing download from source cycle or am I missing something? This question applies even more if I wanted to sync as opposed to just use the copyto option once.

Thanks and again amazing work, wiki, and videos!
 

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.


Development Donations

 

Top NZB NewsGroups!

Members - Up To a 58% Discount!

Trending

Top