2

I am new to these backup things. I have try Backuppc and rsnashot. Backuppc was cool, with web frontend.

My probleam: I don't have any backup servers I just have server and ftp-disk. I wanted to backup my server to ftp-disk, but I'm not sure how to do it? Can I use rsync?

Jorge Castro
  • 71,754
user13123
  • 201

5 Answers5

6

Another solution, if you have lftp:

lftp -e "mirror -R src_local_folder dest_folder_on_ftp_server; exit" -u ftp_user[,ftp_pass] ftp_server

Support SSL/TLS

vignemail1
  • 61
  • 1
  • 2
3

rsync works over ssh, but not over FTP. Full discussion here:

https://serverfault.com/questions/24622/how-to-use-rsync-over-ftp

(Short answer in case serverfault ever goes down: you can't. Try lftp.)

n611x007
  • 555
Broam
  • 1,161
3

you can mount the ftp resource as a local

curlftpfs [user@]host:[dir] mountpoint [options]

and use rsync as to local directories

jet
  • 7,274
1

Little script for that that can be useful, mirror a local directory to distant with given configuration @ beginning of script

#!/bin/bash
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#
#       DESCRIPTION: Mirrors local site and remote site
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
FTP_HOST=aFtpHost.org
FTP_USER=YourUserHere
FTP_PWD=yourPasswdHere
LOCAL_SOURCE_PATH=/home/myName/locations/music/${1} #param 1 from script for example
REMOTE_DEST_PATH=/htdocs/aDirectory

EXCLUDE_FILES_LIST=".svn empty anotherDirectory"

# Construct excludes
for exclude in ${EXCLUDE_FILES_LIST}; do
EXCLUDES="-x ${exclude} ${EXCLUDES}"
done

# -R, --reverse       reverse mirror (put files)
# mirror -e
#--delete        delete files not present at remote site
lftp ftp://${FTP_USER}:${FTP_PWD}@${FTP_HOST} -e "mirror ${EXCLUDES} -R ${LOCAL_SOURCE_PATH} ${REMOTE_DEST_PATH} ; quit"
Philippe Gachoud
  • 5,900
  • 3
  • 43
  • 50
0

Another solution you might want to look into is a package called backup-manager (http://www.backup-manager.org/).

This is a great script and lets you leverage multiple back up methods. Rsync, SSH, FTP, and even Amazon S3. Very simple to configure and you

You can do a aptitude search backup-manager to get more information