[olug] Backing up a FTP server?
Phil Brutsche
phil at brutsche.us
Wed Mar 18 06:12:44 UTC 2009
Some ideas:
a) Try ncftpget instead of wget
b) Are you sure you need the wildcard at the end of the url? If you do
you need to make sure you enclose that parameter in " lest bash interpret it
c) There are a number of typos in the example you gave
I came up with this after 15 minutes or so:
DATE=`date +%Y%m%d`
DST=/jmsg_bkp/JMSG-GM10-01/BKP-Full${DATE}
mkdir -p ${DST}/scenes
mkdir -p ${DST}/settings
mkdir -p ${DST}/scripts
mkdir -p ${DST}/shaders
#
cd ${DST}/scenes
ncftpget -u 88888 -p 88888 -V -T -R \
ftp://72.233.56.5/72.233.56.5_port_27016/garrysmod/scenes/
#
cd ${DST}/scripts
ncftpget -u 88888 -p 88888 -V -T -R \
ftp://72.233.56.5/72.233.56.5_port_27016/garrysmod/scripts/
#
cd ${DST}/settings
ncftpget -u 88888 -p 88888 -V -T -R \
ftp://72.233.56.5/72.233.56.5_port_27016/garrysmod/settings/
#
cd ${DST}/shaders
ncftpget -u 88888 -p 88888 -V -T -R \
ftp://72.233.56.5/72.233.56.5_port_27016/garrysmod/shaders/
#
touch "JMSG-GM10-01 Full Backup Part 6 Finished $(date +%T) $(date
+%Y-%m-%d)"
Cheyenne Deal wrote:
> I have been backing up my game server through ftp, (the only way I can
> access it) and using a shell script to download it weekly. I have modified
> my script to download the whole server and now wget keeps erroring out. It
> keeps saying that the directory can not be found, even though that the
> script creates a folder with the day's date in the file name. Below is a
> modified version of the script, with passwords and accounts removed. I have
> been writing and rewriting these scrips and getting nowhere. Please can
> anyone help me.
--
Phil Brutsche
phil at brutsche.us
More information about the OLUG
mailing list