Results 1 to 8 of 8

Thread: Seedbox download to local machine script?

  1. #1
    Pozarynicoeta's Avatar Angry Monkey BT Rep: +4
    Join Date
    Nov 2008
    Location
    Australia
    Age
    39
    Posts
    62
    Hi all,

    I'm thinking of writing a script that syncs my local machine with my seedbox's download directory. Both machines running *nix so will use bash or python.
    Script will run on cron job on local machine, use sqlite db to check what files it hasn't downloaded already so to prevent redownloading if I move or delete from local machine. Will download via rsync or other method from seedbox.

    Advantages:
    - Local machine doesn't need to be seeding (it has slow upload)
    - Local machine can be turned off
    - When I move or delete a movie form local machine then seedbox can still seed it, but local machine won't redownload since sqlite has this logged.
    - Much better than manual FTP method commercial seedboxes providers expect you to do to retrieve your files as this is done in background plus keeps a log to prevent redownloading as explained above.

    When I write it I will share here, but want to know if anyone has done this already so I don't waste my time...


    EDIT: just to be clear I'm talking about one way syncing - meaning downloading files from seedbox to local machine only, not other way around.
    Last edited by Pozarynicoeta; 11-11-2010 at 06:51 AM.

  2. File Sharing   -   #2
    Jungleboy's Avatar Poster
    Join Date
    Jan 2010
    Location
    Behind my pc
    Posts
    28
    Did you think about doing it with rsync?

  3. File Sharing   -   #3
    Cabalo's Avatar FileSharingTalker BT Rep: +24BT Rep +24BT Rep +24BT Rep +24BT Rep +24
    Join Date
    Mar 2007
    Location
    European Union
    Age
    47
    Posts
    11,849
    Looks definitely interesting, and I know I could use it.
    Please keep us informed. Bookmarked.

  4. File Sharing   -   #4
    ca_aok's Avatar Poster BT Rep: +1
    Join Date
    Feb 2008
    Posts
    1,547
    If you set up keyfile SSH authentication to your local machine (aka, so you won't be prompted for a password for SSH connections), you could try something like this (if you use rtorrent):

    Put this into your .rtorrent.rc:
    system.method.set_key = event.download.finished,send_me,"execute=/path/to/send.sh,$d.get_directory="
    Then make send.sh, and chmod it to be executable:
    #!/bin/bash

    DIRECTORY=$1

    sftp user@homeaddress
    put $DIRECTORY
    exit

    fi
    This is completely untested and I have no idea if it'll actually work, but in theory it should.

    For this to work, you'd need:
    -rtorrent on your remote machine
    -an SFTP server on your home machine
    -Keyfile authentication on your home machine
    -A static home IP or some sort of domain name (I recommend using No-IP if you have a dynamic IP)
    Last edited by ca_aok; 11-12-2010 at 05:40 PM.
    Quote Originally Posted by whatcdfan View Post
    u are somewhat fairer then the last occasions but still pal i give a damn to what u said and expect i really dont need anything from u or optimuscrime i get what i want coz u 2 guyes dont own bittorrent and i dont think i portrayed any image i wrote simple english and u are seems to be very good at making assumptions if someone is not a cheater and u assume he's a cheater and write what u wrote and when u are proven wrong who u think will owe an apology then barack obama????

  5. File Sharing   -   #5
    Quote Originally Posted by ca_aok View Post
    If you set up keyfile SSH authentication to your local machine (aka, so you won't be prompted for a password for SSH connections), you could try something like this (if you use rtorrent):

    Put this into your .rtorrent.rc:
    Then make send.sh, and chmod it to be executable:
    #!/bin/bash

    DIRECTORY=$1

    sftp user@homeaddress
    put $DIRECTORY
    exit

    fi
    This is completely untested and I have no idea if it'll actually work, but in theory it should.

    For this to work, you'd need:
    -rtorrent on your remote machine
    -an SFTP server on your home machine
    -Keyfile authentication on your home machine
    -A static home IP or some sort of domain name (I recommend using No-IP if you have a dynamic IP)
    That, and
    Send.sh should check whether the local machine is up. If it wasn't, it should write the location of the downloaded files to a log file. The local machine has a cron job to query the remote log file for new completed downloads, and obviously make the seedbox to FTP the files to home.

  6. File Sharing   -   #6
    Wow that sounds like a great idea. It would come in very handy!

  7. File Sharing   -   #7
    Pozarynicoeta's Avatar Angry Monkey BT Rep: +4
    Join Date
    Nov 2008
    Location
    Australia
    Age
    39
    Posts
    62
    After creating the script in a few different languages (bash, C#, PHP) I found a solution that was simple and easy to understand in Python3 (my new favorite scripting language!).

    I wrote it as a guide here https://filesharingtalk.com/threads/4...xid=bittorrent

  8. File Sharing   -   #8
    Poster
    Join Date
    Jul 2010
    Posts
    112
    This has been done on scc, check out the forums

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •