On Wed, 23 Apr 2003 10:54 pm, Johnno wrote: > I am trying to a script that use ftp to mirror websites from one server to > other server(Backup) plus some other data files. > Does anyone know where I can find such a script??
The deb package "mirror" uses ftp. If rsync is acceptable both ends then... #!/bin/sh SERVER=myotherserver.com COMMAND='/usr/bin/nice /usr/bin/rsync --exclude-from=/etc/backup.conf -azxv --delete' $COMMAND $SERVER:/ /mnt/hdc5 $COMMAND $SERVER:/usr/ /mnt/hdc5/usr $COMMAND $SERVER:/var/ /mnt/hdc5/var $COMMAND $SERVER:/home/ /mnt/hdc5/home adjust paths accordingly and my /etc/backup.conf looks like... /dev /proc /mnt /tmp lost+found core vmlinuz System.map and set up an ssh key and copy it to $SERVER so you don't have to manually type the password each rsync invocation. rsync is way more efficient than ftp. --markc