Our Logo Image

Fernhill Linux Project

A non-profit organisation who promote and encourage the use of Linux based operating systems & open source
software by providing free IT solutions, software, support, guides and advice.

About Us
About Linux
Services & Support
Guides & How To's
Linux Distros
Contact Us

Network FTP Backup

Fernhill Linux Project would like to thank Miller Technologies, creators of Bridge Linux for writing this tutorial.
If you have any comments, feedback or questions you can contact us or Miller Technologies using the link below.

Bridge Linux

Today we'll be setting up an FTP server with Debian Stable and an external hard drive for automatic network backups with Déjà Dup, the default backup app for Ubuntu 12.04.

Lets start with the server, because obviously we'll need that first.

This tutorial was written using Déjà Dup 20.2-2, it may not be exactly the same on another version.


On the server, run "sudo apt-get update" then "sudo apt-get install vsftpd".

First we need to create a new user.

Run "adduser" for an interactive process, make sure you remember the username and password. 

Now edit the "/etc/vsftpd.conf" file as root/sudo and your editor of choice, in this example we will use 'nano'.

Run "sudo nano /etc/vsftpd.conf" and change "anonymous_enable=YES" to "anonymous_enable=NO" to disable anonymous FTP users,

uncomment (remove the '#' from) "#write_enable=YES" to allow writing to the FTP server,

uncomment "#local_enable=YES" to enable connections from the host,

uncomment "#chroot_list_enable=YES" and "#chroot_list_file=/etc/vsftpd.chroot_list" so we can create a jail for our user.

Save the file with CTRL-X, the "y" key, then <enter>. 

Run "sudo mkdir /home/<username>/bak_mount" to make a mount directory for the external drive where we will back up to,

"sudo fdisk -l" to find the device ID of your external drive and partition (i.e. /dev/sdf1),

and "sudo mount <dev_id> /home/<username>/bak_mount".

I recommend using an empty directory for the backup, so if your external drive's partition isn't blank,

make a new folder with "sudo mkdir /home/<username>/bak_mount/backup".

Finally edit the chroot jail list by running "sudo nano /etc/vsftpd.chroot_list",

add your new user's username to the file, then save it.

Get the IP address by running "ifconfig | grep 'inet'" and look for something that's not localhost (,

keep track of the IP address, as we'll need it to connect to the server.


And now to the client that needs backup. If you're using Ubuntu, Déjà Dup is probably installed already, so open it.

On the first page, switch automatic updates on.

In the storage tab is where we'll do most of the work, in backup location select FTP,

in server put the IP address of the FTP server, in port put 21,

in folder put "/bak_mount" if your partition was blank or "/bak_mount/backup" if you made a new folder,

check the username box and enter the username of the new user you created and added to the chroot list on the server.

In the folders tab, the default is to backup the entire home folder without the trash, this is fine for most people.

In the schedule tab I left mine on weekly and keep backups forever (it'll delete when it runs out of room),

but you can change these as you see fit.

Go back to the overview tab and click backup now, it should connect and ask for the password for your FTP user,

enter it and select remember password unless you want to type it every time.

It should also ask for an encryption password to secure your backup,

enter one and select remember password unless you want to type it every time.


Fernhill Linux Project would like to thank BPWebSolutions for their help and support. By using this link BPWebSolutions will also donate a small percentage of any purchases to Fernhill Linux Project.