Skip to content

Script for sync operations between your NAS and your seedbox.

License

Notifications You must be signed in to change notification settings

johanndt/seedboxsync

 
 

Repository files navigation

SeedboxSync

Build Status Code Climate PyPI version

Provides synchronization functions between your NAS and your seedbox:

  • Syncs a local black hole (ie: a NAS folder) with the black hole of your seedbox.
seedboxsync --blackhole
  • Downloads files from your seedbox to your NAS. Stores the list of downloaded files in a sqlite database, to prevent to download a second time.
seedboxsync --download
  • Also provides queries to know last torrents, last downloads, etc.

Currently, only sFTP is supported.

Requirements

See requirements.txt.

Installation

With pip

In root:

pip install seedboxsync

Or in user:

pip install --user seedboxsync

Clone repository

  • Install script in /opt/llaumgui/seedboxsync:
sudo mkdir -p /opt/llaumgui
cd /opt/llaumgui
sudo git clone https://github.com/llaumgui/seedboxsync.git
cd seedboxsync
sudo chmod +x seedboxsync.py

Configuration

You can use the example configuration, this file is located in:

  • /usr/local/etc/ (pip install)
  • ~/.local/etc/ (pip install in user mode)
  • /opt/llaumgui/seedboxsync (clone repository)
sudo cp /usr/local/etc/seedbox.ini.dist /etc/seedbox.ini

You can put your configuration in:

  • seedboxsync.ini in the root of the sources folder.
  • ~/.seedboxsync/seedboxsync.ini
  • /usr/local/etc/seedboxsync.ini
  • /usr/local/etc/seedboxsync/seedboxsync.ini
  • /etc/seedboxsync.ini
  • /etc/seedboxsync/seedboxsync.ini

Usage

In command line

usage: seedboxsync [-h] [--blackhole | -t [LASTS_TORRENTS] | --download |
                      -d [LASTS_DOWNLOADS] | -u] [-q]

Script for sync operations between your NAS and your seedbox.

optional arguments:
  -h, --help            show this help message and exit
  --blackhole           send torrent from the local blackhole to the seedbox
                        blackhole
  -t [LASTS_TORRENTS], --lasts-torrents [LASTS_TORRENTS]
                        get list of lasts torrents uploaded
  --download            download finished files from seedbox to NAS
  -d [LASTS_DOWNLOADS], --lasts-downloads [LASTS_DOWNLOADS]
                        get list of lasts downloads
  -u, --unfinished-downloads
                        get list of unfinished downloads
  -q, --quiet

In crontab

# Sync blackhole every 2mn
*/2 * * * * root seedboxsync --blackhole

# Download torrents finished every 15mn
*/15 * * * * root seedboxsync.py --download

License

Released under the GPL v2.

About

Script for sync operations between your NAS and your seedbox.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%