1

I have two computers connected to same network. First computer (laptop) is for my primary use. I use Ubuntu's Backups program to backup my data for that I have to connect external hard drive. Now I am tired of connecting and removing the external hard drive.
So I keep it connected to a second computer (desktop) but want to backup the data directly to external hard drive connected to second computer.

What things I need to do?

  • I'm not familiar with the Backups program. Does it allow you to type in a path where you want to save your backup, or do you have to select an actual external harddrive? If you can type in a path where you want to save your backup, you'll need to share the external harddrive over the network, for instance as a SAMBA share. Do both computers run Ubuntu? – Tobias Nov 10 '15 at 12:26
  • @Tobias both of them run ubuntu and yes I can set any path in backup program – Edward Torvalds Nov 10 '15 at 12:28
  • 1
    Depending on which version of Ubuntu, it could be as simple as right clicking on the folder on the desktop and selecting 'Local Network Share' and adding a line to /etc/fstab on the laptop. Here are two examples: ubuntuhandbook.org/index.php/2015/02/… wiki.ubuntu.com/MountWindowsSharesPermanently – Tobias Nov 10 '15 at 12:41
  • @Tobias thanks man, your suggestion works. I have found a simple answer. – Edward Torvalds Nov 10 '15 at 18:35
2

I have later found that there is an option to backup to Samba/Network location in Deja dup backups itself. silly me, couldn’t find before I posted the question ;-)

All you have to do is first launch the Backups program from dash. Now open Storage location tab.
in Storage location drop down menu select Windows share and input other details as follows:

  1. Server: it will be the static IP address of the computer whose folder you want to keep the backup in.
  2. Folder: name of the folder on second computer (give absolute path) you are keeping backup. Also specify subdirectory if any
  3. Username: In my case the samba shared folder is password protected, for that I have to enter the username by which I login when I mount it or open it while browsing the network. You will be asked password too, in a separate dialog window. For automatic backup you might wanna check remember password
  4. Domain Name: Its usually WORKGROUP

Deja dup backup to samba shared network location

2

You may use nfs to mount your directory from second computer.

Setup nfs server on second computer:

  1. apt-get install nfs-server and start nfs server.

  2. Let say you have mounted the External HDD on the /mnt/backup, so we will export this as NFS share.

  3. Edit /etc/exports:

    /mnt/backup  *(rw,no_root_squash,async)
    
  4. Export the share:

    exporfs -a
    
  5. To verify:

    exportfs
    

On the first computer:

  1. nfs-common should be default package, if not, install apt-get install nfs-common.

  2. Mount the NFS share:

    mount first:/mnt/backup /mnt/backup
    

Deja Dup: Now you will able to backup using Deja Dup via Folders option.

  • as mentioned in answer I am using Backups program, also know as Deja dup – Edward Torvalds Nov 10 '15 at 13:12
  • edited my answer to suite your needs – Aizuddin Zali Nov 10 '15 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.