Need Solution to sync a remote FTP (WEB) Site


Recommended Posts

Hi,

 

I am running a big website at a hoster. On my old server (which should be replaced by unraid) I am using curlftpfs to mount the ftp directory and then doing a rsync on changes.

 

It seems that curlftpfs is not available on unraid. 

Does someone have an Idea how I can do this backup on unraid?

 

I have only HTTP and FTP Access to my Website. No SSH.

 

Br,

Johannes

Link to comment

Hi,

 

It seems I found an option via lftp and the mirror option.

 

Testing now the following script:

 

#!/bin/sh
#  @author:       Alexandre Plennevaux
#  @description:  MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'

# DISTANT DIRECTORY
REMOTE_DIR='/absolute/path/to/remote/directory'

#LOCAL DIRECTORY
LOCAL_DIR='/absolute/path/to/local/directory'

# RUNTIME!
echo
echo "Starting download $REMOTE_DIR from $HOST to $LOCAL_DIR"
date

lftp -u "$USER","$PASSWORD" $HOST <<EOF
# the next 3 lines put you in ftpes mode. Uncomment if you are having trouble connecting.
# set ftp:ssl-force true
# set ftp:ssl-protect-data true
# set ssl:verify-certificate no
# transfer starts now...
mirror --use-pget-n=10 $REMOTE_DIR $LOCAL_DIR;
exit
EOF
echo
echo "Transfer finished"
date

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.