Results 1 to 4 of 4

Thread: [RELEASE] Backups over eth1

  1. #1
    Join Date
    Sep 2005
    Posts
    366

    [RELEASE] Backups over eth1

    This script has been tested on servers running CentOS 4.2 with DirectAdmin 1.26.0 and backups over 1GB in filesize.

    Since we've seen multiple requests for transfers over other interfaces then eth0 and we thought it could be useful for our company as well, we rewrote the ftp upload script from DirectAdmin.

    The script is based on Curl in combination with Bash for error reporting. If I'm not mistaken, Curl comes with a standard DirectAdmin installation.

    Installing it is as easy as 1 + 1.
    Code:
    cd /usr/local/directadmin/scripts/
    mkdir custom
    wget -O /usr/local/directadmin/scripts/custom/ftp_upload.php http://servecontent.sensson.net/files/ftp_upload
    chmod +x ftp_upload.php
    The Curl binary is probably not in the same folder on all distributions. On CentOS 4.2 it's /usr/local/bin/curl. If it's not there on your server, open up ftp_upload.php and replace CURL=/usr/local/bin/curl with the path of your curl binary.

    Default installation will transfer your backups over eth0. It can handle both eth0 and eth1 as eth0:1 or eth1:3 for instance. You can change the interface by opening up ftp_upload.php and changing ETH=eth0 to another interface.

    If you want to return to the previous system you can uninstall it by performing the following commands:
    Code:
    rm -f /usr/local/directadmin/scripts/custom/ftp_upload.php
    Last edited by ju5t; 04-24-2009 at 01:54 PM.

  2. #2
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    I'm a bit confused. The default operation of curl is to use your system's default routing. Won't it work if you don't specify an interface it should choose the right interface based on the IP#.

    We have lots of systems with an Internet interface and a private network interface, and we've never had a problem with any other program. (We've never tried it with curl.)

    Is there some specific reason why curl needs this code?

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

  3. #3
    Join Date
    Sep 2005
    Posts
    366
    This is more useful if you run offsite backups than it is for backups within your network probably.

    However, I came across the following issue:

    Setup:
    eth0: 1.2.3.4
    eth1: 1.2.3.5

    Backing up over eth1 resulted in an FTP connection from 1.2.3.5 but MRTG shows on both local as switch level traffic from eth0. Which basically demolishes the purpose of this script, running backups over eth1 within the same network. Heh.

  4. #4
    Join Date
    Jun 2003
    Location
    California
    Posts
    26,123
    Okay .

    We use nonroutable IP#s on ETH1, so I didn't get the full picture.

    Thanks!

    Jeff
    +1 951 643-5345
    Third-Party DirectAdmin administration and support
    Dedicated Servers, Dedicated Reseller Accounts
    NoBaloney Internet Services div. Qnito Incorporated
    848 North Rainbow Blvd., Suite #3789
    Las Vegas, NV 89107-1103

Similar Threads

  1. Changing DirectAdmin to eth1 from eth0
    By idawgik in forum General Technical Discussion & Troubleshooting
    Replies: 9
    Last Post: 02-26-2010, 11:21 AM
  2. da 1.34 release!
    By ben29 in forum DirectAdmin Version Updates
    Replies: 34
    Last Post: 10-09-2009, 07:26 AM
  3. Admin backups or user backups
    By Conrad in forum Admin-Level Difficulties
    Replies: 1
    Last Post: 12-27-2007, 08:54 AM
  4. release of PHP 4.4.5
    By @how@ in forum Required Software Version Updates
    Replies: 35
    Last Post: 02-23-2007, 11:59 AM
  5. Add IP/Virutal Interface to Eth0(system) or Eth1?
    By TomM in forum System-Level Technical Discussion
    Replies: 1
    Last Post: 10-30-2006, 02:06 PM

Posting Permissions

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