What's new
PGBlitz.com

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

autoupload sonarr/radarr after completed

T

TheShadow

Guest
The way I would do it is you use rclone sync or rclone copy instead of rclone moveto. You can edit the script by running npgmove or npgblitz and change the rclone command near the bottom of the file. then reload with sudo service pgmove restart or sudo service pgblitz restart.

If you redeploy mounts, you'll need to edit this config again. Additionally you will have to manually manage the space or decide when to delete local.
 

ultralord

Full Member
thanks for the reply.. i am asking if is possible to do it with script proccess from sonarr standalone script pgmove and pgblitz i want to left like it works by default..
 

ultralord

Full Member
@TheShadow

i am thinking something like this.. maybe i have errors but if u possible to help me..

Code:
# autobackupepisode.sh
# !/bin/bash

# Automatic Backup Sonarr episodes and sync to Google Cloud Drive

if pidof -o %PPID -x "$0"; then
   exit 1
fi

# Variables
#local_backups=/mnt/BACKUPS
remote=tdrive
useragent="$(cat /var/plexguide/uagent)"
# full path to copy from
source = "$sonarr_episodefile_path"
# series title
title = "$sonarr_series_title"
# the season and file path
episode = "$sonarr_episodefile_relativepath"
#season number
season = "$sonarr_release_seasonnumber"
# backup path
backup_path=/mnt/move/TV
cd "$backup_path"
mkdir "$($($title)\$($season)"
# destination copy
destination = "$($backup_path)\$($title)\$($episode)"

# Send backup to Google Drive
rclone --config "/opt/appdata/plexguide/rclone.conf" copy "$source" "$remote:$destination" --user-agent="$useragent"
 

ultralord

Full Member
also people says that script it works on powershell
Code:
# full path to copy from
$source = $env:sonarr_episodefile_path

# series title
$title = $env:sonarr_series_title

# the season and file path
$episode = $env:sonarr_episodefile_relativepath

# backup path
$backup_path = "E:\TV"

# destination copy
$destination = "$($backup_path)\$($title)\$($episode)"

# if you want to log each copy
Add-Content -Path E:\sonarr_copy.log -Value "$($source) to $($destination)"

# create a shell file so directories are present (Copy-Item will not create directories)
New-Item -ItemType File -Path $destination -Force

# copy the item to the backup location
Copy-Item "$($source)" "$($destination)" -Force
can someone help me to make it for linux bash script?
 
Last edited:

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

Online statistics

Members online
4
Guests online
116
Total visitors
120
Top