Posted on Friday, 7th June 2013 by Michael

Quick little shell script to backup a full website recursively with ftp

Recently I had a client that was trying to use several methods for doing remote recursive backups of their website content. I responded that this a very trivial task using the ncftpget command. Even though showing them the syntax they asked if it could be simpler, so hence my shell script to simplify the process.

#!/bin/bash
###################################
## Created by Michael LaSalvia
## of Digital Offensive
##################################

echo -e "Enter a host to connect to:  "
read rHost
echo -e "Enter username:  "
read rUse
echo -e "Enter local directory and Path: "
read rPath
echo -e "Enter fodler to download or * for all:  "
read rRpath
echo "### Note your will be prompted for the password ##"
ncftpget -R -T -v -u $rUse $rHost $rPath $rRpath

Enjoy and let me know if you have any questions.

Posted in Code | Comments (0)

Leave a Reply

*