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
Lets start with the server, because obviously we'll need that
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".
need to create a new user.
Run "adduser" for an
interactive process, make sure you remember the username and
Now edit the "/etc/vsftpd.conf" file as root/sudo and
your editor of choice, in this example we will use 'nano'.
"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
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.
and "sudo mount <dev_id>
I recommend using an empty
directory for the backup, so if your external drive's partition
make a new folder with "sudo mkdir
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 (127.0.0.1),
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,
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
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.