Page 1 of 1

[PP-Script] Transfer downl. Files to another Server/Folder

Posted: 24 Apr 2017, 12:03
by ProfDrLuigi
Hey folx.

I wrote a little Bash-Script to transfer downloaded Stuff to another Server / Local Folder. Perhaps someone want to use it. Its configurable via NZBGet GUI. If you have ideas .... don't hesitate to tell me. :D

To-Do
- SSH Password authentication -> done
- FTP support for local Servers -> done
- Your Ideas

Visit me on Github for more Scripts.

https://github.com/ProfDrLuigi/nzbget-scripts

EDIT:
Fixed error in Script.

Re: Transfer downloaded Files to another Server via rsync

Posted: 24 Apr 2017, 12:28
by hugbug
Thanks for sharing it.

Small suggesteion: reformatted option descriptions for better view in web-interface:

Code: Select all

# Should the Sourcefile(s) be deleted after Transfer (yes, no).
#Delete=no

# Remote hostname.
#Hostname=your.hostname.xy

# rsync/SSH Port on destination Machine(1-65535).
#Port=22

# Remote username.
#Username=Your Username

# Remote path.
# Trailing / is not needed.
#Path=Destinationpath
Changed "User" to "Username" (webui shows "username" in a smaller box). Changed y/n to yes/no.

Re: Transfer downloaded Files to another Server via rsync

Posted: 24 Apr 2017, 12:48
by ProfDrLuigi
Thanx. Looks much better.

Re: Transfer downloaded Files to another Server via rsync

Posted: 24 Apr 2017, 13:16
by hugbug
BTW, you can edit the fist post to update the script, if you want.

Re: Transfer downloaded Files to another Server via rsync

Posted: 24 Apr 2017, 13:30
by ProfDrLuigi
Yes you are right. Done.

Re: [PP-Script] Transfer downloaded Files to another Server

Posted: 27 Apr 2017, 11:08
by ProfDrLuigi
Done so far. If anyone want to test it ....

Re: [PP-Script] Transfer downl. Files to another Server/Fold

Posted: 12 May 2017, 16:08
by abc08154711
I tried to use the script but failed. Actually I want to use it for a really simple task. After a specified category is downloaded I want the folder and files to be moved to another location on the same host. So i used the option 'Local' and skipped all other settings except destination which i filled with '/volume1/mydestination'. Unfortunately the script fails and I have no clue why. This is what the log offers:

ERROR Fri May 12 2017 17:54:55 Post-process-script ReTransfer.sh for myfile failed (terminated with unknown status)
INFO Fri May 12 2017 17:54:55 ReTransfer: /usr/local/nzbget/share/nzbget/scripts/ReTransfer.sh: line 124: syntax error: unexpected end of file

Do any of you have a clue?

Re: [PP-Script] Transfer downl. Files to another Server/Fold

Posted: 21 May 2017, 18:33
by ProfDrLuigi
Yes you are right. I forgot one "fi" at the end. Its fixed now.

Re: [PP-Script] Transfer downl. Files to another Server/Folder

Posted: 12 May 2018, 18:28
by ProfDrLuigi
Fixed:
- Missing recursive flag for scp and rsync
- String of Destinationpath was wrong
- Delete Command fixed

Script should work correct now.