Backup Files Through SSH on Ubuntu
Backing up files is very important because it protects you from hardware breaks, natural disasters or other errors. In this tutorial i will teach you how to use your ssh server to backup your files. This wonderful tool, called Deja Dup can backup
your files to remote servers such as FTP, SSH, WebDav and Windows Share. A very good and useful feature of this tool is the ability to encrypt your backups and password protect them. Security is very important and Deja Dup does this for you very well. If you want you can choose to not password protect your backup, but i do not recommend that to anyone. I introduced Deja Dup in a previous article and explained how to backup files in a local folder. You can find it here. You cand find the backup utility in the system settings like shown in Figure 1.
Why do i use ssh for backing up my files? I use ssh often because it is very secure and offers encryption. If someone or a third party tries to sniff my data while i am using ssh, ssh detects it and reports it to us.
Dejadup backup tool has a very user friendly interface and it organises everything in four panels. These four panels are the Overview panel, the Storage panel, the Folders panel and the Schedules panel. The Overview pan gives you information about your backup settings, such as your backup location, folders to backup or ignore, most recent backup and next automatic backup. As you can see from Figure 2, my backup settings under Overview panel show that i want to backup my home(oltjano) directory to a local folder, to my Desktop. We can not backup to another computer with such settings so we have to change them.
Storage panel allows us to choose the backup location. Since we want to backup files through ssh protocol, we go under Storage folder and choose SSH like shown in Figure 3.
Now we need to specify the server ip address, the port number, the folder in the server where our files will be backed up and the username of our ssh server. The default port of ssh service is 22, but maybe you do no use the default port so it is up to you to put a port number or not. If your ssh server is listening on port 22 you can leave the Port box empety. I prefer to put the port number, even if i use the default ssh port number. My configuration for ssh is shown in Figure 4.
After you have configured your settings under Storage panel it is time to choose folders you want to back up, edit Schedule settings and finish the backup process.
After you have choosen your folders you can choose how often you want to backup under Schedule panel like shown in Figure 7.
No more chit chat! Go under Overview panel, verify your settings and if you have done any mistake or want to make any change take your time and do the changes you want. If everything is ok then click Back Up Now. After that, deja dup will use your ssh client to request the ssh server and if this is your first time you login to the server through ssh a small dialog box will warn you like shown in Figure 8. If you like to continue click Login Anyway.
After you choose to Log in , the ssh server will ask you to type your password like shown in Figure 9.
After you are logged in a dialog box will appear and ask you if you want to password protect your backup or not. After that, the Deja Dup tool will start backing up and uploding to the server. I am gone now. Do not forget to share this post with your friends, family or on social sites.