Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: FTP sync?

  1. #11
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: FTP sync?

    rsync is a snap to learn and you can tunnel over ssh if you wish

    http://sial.org/howto/rsync/
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  2. #12
    Join Date
    Mar 2009
    Beans
    1

    Re: FTP sync?

    I am a fresh Ubuntu user - loving it so far - but I found a pretty simple way to synchronize files over FTP, using lftp.

    Create a script for lftp:
    Code:
    open ftp://username:password@ftp.mydomain.cz
    mirror -R -v --only-newer /home/moglum/folderToBackup /remoteFolder
    and a shell script to execute it
    Code:
    lftp -f backupScript.txt &
    This makes a backup of your local folder to the remote server.
    To get your files from the server you would use a similar script. Something like this:
    Code:
    open ftp://username:password@ftp.mydomain.cz
    mirror -v --only-newer /remoteFolder /home/moglum/folderToBackup
    Simple enough for me and working well. man page for lftp is a great resource. You can easily backup multiple folders, log the activity to a file or schedule your backups.

  3. #13
    Join Date
    Feb 2010
    Beans
    1

    Question Re: FTP sync?

    Hi Moglum,

    You tutorial is really great. Since I am a real noob on Ubuntu (Mac User) this was very hard for me to do.

    I made the script working with lftp and it's downloading/mirroring the webserver to my local machine.

    There are some thing I still have a question about and I can't find the answer.

    1. how can I schedule the lftp scrip.txt to run every week or so?
    2. can I monitor and see how far the ftp mirroring is?
    3. can I add more servers in my scipt.txt? So I have 2 webservers I want to backup to my local machine.

    I hope you understand what I am trying to do and can help me out here


    Stefan

  4. #14
    Join Date
    Jan 2008
    Beans
    4

    Re: FTP sync?

    Ubuntu has a great way to do scheduling of anything that can be run from the command line. There is a great tutorial for this that can be found here:

    https://help.ubuntu.com/community/CronHowto

    I hope this helps.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •