Skip to content

Instantly share code, notes, and snippets.

@justinhartman
Last active February 26, 2018 19:53
Show Gist options
  • Save justinhartman/7552062 to your computer and use it in GitHub Desktop.
Save justinhartman/7552062 to your computer and use it in GitHub Desktop.
Steps to set up remote backups on a server

Install curlftpfs (if on Windows, use cygwin)

Use the following steps to set up remote backups on a server.

Create local mount path

$ mkdir -p /mnt/myftp

Mount the destination ftp site using curlftpfs

$ curlftpfs -o allow_other ftp://myusername:mypassword@ftp.mydomain.com /mnt/myftp

rsync

With rsync in place use the append option. Also use a long timeout value as the first long phase, the in place comparison, will take a while.

$ rsync -rzvvv --inplace --append --progress --stats --timeout=7200 /mnt/myftp/path/to/source/file.log /path/to/local/destination/

When you need to umount the ftp site

$ sudo umount myftp

You can also mount from /etc/fstab by appending the following line

curlftpfs#myusername:mypassword@ftp.mydomain.com /mnt/myftp fuse allow_other,rw,user,noauto 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment