Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Boston, MA

    FreeBSD (crontab) Backup Scripts

    Anyone have a script coded in perl or sh to backup and tarball important files (you specify dirs) and upload to a remote ftp site? I have coded about 2 and I cant seem to get this remote ftp string working and started all over again......

    very frusterating =/
    Axcelx Technologies - James
    Boston Colocation | Boston VPS
    Massachusetts Server Colocation and Dedicated Servers

  2. #2
    Join Date
    Apr 2003
    Melbourne, AU
    maybe you should try a different approach to the problem? think scp

    there's numerous advantages to using scp instead of ftp. like:

    1. encryption
    2. compression
    3. passwordless operation (with public key authentication)
    4. only requires a single port (for sshd) to be open.

  3. #3
    Join Date
    Nov 2003
    Marylebone, London, UK
    you can use FTP easily from a perl script, if that is
    what you are tring to do:

    use Net::FTP;

    $username = "foo";
    $password = "bar";
    my $localfile = "data.txt";
    my $remotefile = "data.txt";

    my $ftp = Net::FTP->new("",
    Passive => 1,
    Timeout => 60,
    Debug => 1)
    or die "Can't connect: $@\n";
    $ftp->login($username, $password) or die "Couldn't login\n";
    $ftp->put($localfile, $remotefile) or die "Couldn't put $localfile\n";

    Note that the above doesn't change directories on the
    remote server (
    and make sure you chdir to the local directory where
    the example file 'data.txt' resides.

Posting Permissions

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