Linuxmint or Ubuntu: Crashplan backup using headless Synology NAS

If you’re using a Synology NAS box and would like to back up your files to offsite storage service Crashplan (which is relatively inexpensive), there is a relatively easy way to do this.  However, you need to think about the Crashplan software as having two components.  There is the backup engine, or the software that communicates with Crashplan’s servers and sends the files you want backed up to their servers.  Then there is the “head” or user interface which tells the engine what to back up and when.  If you’re backing up your Synology box, then the engine will go on there.  You can use any OS for the head, but I’m running Linuxmint and here is how I got it to work.

1) On your Synology box, first you need to download and install Java SE for embedded packages following these instructions.  Then you need to download and install the Crashplan package for Synology NAS following these instructions. Make sure you choose the correct version of Crashplan from the link above.  You don’t want to install CrashPlan Pro if you’re just running CrashPlan – it won’t work.

2) Once you’ve got both of those up and running on your Synology box, you should see something like this:

crashplan-01

crashplan-02

crashplan-03

3) The next step is to install CrashPlan on your desktop computer so you can control the engine on your Synology box (i.e., tell it what to backup and when).  First, download the CrashPlan software for your OS here.  Once you’ve downloaded the .tgz file, uncompress it to a folder (doesn’t really matter where; your’e desktop or home folder will work).  Then open a terminal and navigate to where you unpacked the CrashPlan files.  At the terminal, type:

sudo bash install.sh

You’ll then need to follow the prompts, but it should install the software on your computer.

4) Now is the tricky part.  If you follow the directions on CrashPlan’s website to connect the “head” to the “headless engine” it won’t work.  Their directions say to edit the file /usr/local/crashplan/conf/ui.properties by uncommenting the line #servicePort=4243 and changing it to servicePort=4200.  You then need to set up an SSH tunnel.  Here are their directions.  I tried a lot of variations of this and didn’t work.  But you know what did?  Editing a different line.  In that same file, uncomment the line that says #serviceHost=127.0.0.1 and change it to serviceHost=192.168.2.100 (i.e., the IP of your Synology box).  Save the file and close it.

5) You should now be able to open the CrashPlan GUI and control your Synology box remotely.

 579 total views,  4 views today

LinuxMint or Ubuntu: How to Automount Synology Shares

UPDATE:  As of Ubuntu 13.04, these directions no longer work.  I figured out a way to get this to work, however.  See the updated directions at the bottom of this post.

——————Old Directions————————————

If you’d like to share your network attached storage from a Synology file server with your Linuxmint or Ubuntu machine and have it appear as just another folder, you can set the Synology unit to automount on your computer.  These steps assume that you have already set up your Synology unit and are sharing at least one folder over the network.  It also assumes that you are already connected to the same local network as your Synology unit.

To set up the automount, do the following:

1) Install the package nfs-common, either using synaptic or the command line:

synology-01

(from the command line: sudo apt-get install nfs-common)

2) Open a console or terminal and type “ifconfig” to find out your IP address on your local network.

synology-02

 

Let’s assume your IP on the local network is 192.168.2.1 (as shown in the figure).

3) Open the Synology interface and then open the Control Panel:

synology-03

4) Click on “Shared Folder” which will show you a list of your shared folders.  Synology comes with the ability to share folders using the nfs protocol.  It is a secure protocol that requires you to add the IP address of the computer that is going to be allowed to access files on the Synology NAS.  Once you see the shared folders, select the folder you want to share, then click on “Privileges” and then “NFS Privileges”.

synology-04

 

5) In the next window, click on “Create” and then add the IP address of the computer with which you want to share that folder.  You should also decide what privileges you want to grant that computer.  If you grant it read/write privileges, that computer can modify files.  If you grant it the read privilege, that computer can only read files.

synology-05

6) Once you’ve done that, you should be able to access the shared folder over your network.  However, what we want to do is make any shared folders automatically mount over the network every time you start your computer.  To do so, you’ll need to do two more things.  First, create a folder on your computer to map the shared folder to.  An ideal location is in your home folder since you already have read/write privileges there.  So, for instance, if you are sharing photos over the network, create a folder in your home directory called “NASphotos” by doing the following from the terminal (or just create it in a file explorer): mkdir /home/user/NASphotos

7)  Next, you’ll need to edit your /etc/fstab file.  To do so, open a terminal and type: sudo kate /etc/fstab

(You could also use gedit or some other text program, like nano.)

8) This should open the /etc/fstab file in a text editing program.  You’ll need to add the following lines to your /etc/fstab file:

Any line that starts with the pound sign “#” is a comment line.  I like to add a comment line so I know what my command is doing.  Here’s the line I add:

# automount file synology

Next is the line that actually does the work:

     192.168.2.100:/volume1/photos /home/user/NASphotos nfs nouser,rsize=8192,wsize=8192,atime,auto,rw,dev,exec,suid 0 0

You’ll need to change the parts that are bolded.  The IP is the IP of your Synology unit on the network.  If you have a different name for your volume on your Synology unit, you’ll need to change “volume1” to whatever it is.  Replace “photos” with the name of the shared folder on your Synology unit.  Replace “user” with your username.  And replace “NASphotos” with whatever folder you created in step 6.

Save the file and close it.

8)  Now, assuming you’ve done everything correctly, type the following into a terminal to mount the shared folder: sudo mount -a

Your shared folder should now show up in your file explorer (e.g. Dolphin) and should do so every time you start your computer.  Depending on the privileges you granted yourself on the Synology NAS, you should be able to read and/or write whatever files you’ve stored on the Synology unit as if they were on your own computer.

 

——————————————New Directions—————————————

UPDATE: As of Ubuntu 13.04, the directions I gave above stopped working. After tinkering with the settings for a while, I found a way to make it work.  Follow all of the above steps.  However, when you edit the fstab file, try using the following format for each share you want to mount:

192.168.2.100:/volume1/photos /home/user/NASphotos nfs rw,hard,intr,nolock 0 0

This is working for now.  This was based on this article on the ubuntu help site.

 4,916 total views,  15 views today

LinuxMint or Ubuntu: Automount Server Share

(Updated to reflect changes in Ubuntu 12.04 LTS – 5/15/2012)

While I’m still not 100% sure how I got my file server to share all the files across the network (whatever I did, it worked; when the server dies, I’ll figure it out and post it here).  Regardless, I recently reformatted my desktop and had to set up the file server share to automount on my desktop for easy access to the files (I store all my music, videos, and lots of other files on the file server).  Here are the steps I took to set up my automounting file share on my Linux desktop (courtesy of the ubuntu wiki and this website as well).

1) First you need to install two packages: “samba” and “smbfs.” You can install these from the terminal or using synaptic.  Here’s how you would do it from the terminal:

sudo apt-get install samba smbfs

2) Once those are installed, you need to create a mount point for your share.  The easiest way to do this is from the terminal as it requires root privileges.  The share, which, in my case, is called “fileshare” is mounted in my user directory, so you use the following:

sudo mkdir /home/(your username)/fileserver

3) Next you need to edit the fstab file.  This is a file that tells the operating system which drives should be mounted on startup.  To edit it, enter the following at the terminal:

sudo gedit /etc/fstab

4) The text editor will pop up with your fstab file open for editing.  You need to add a line to the fstab file that tells the operating system what to mount on startup, where to mount it, and what permissions to use.  Here is the line I used

//192.168.3.101/fileserver-share  /home/ryan/fileserver  smbfs  username=XXXXX,password=XXXXXXX 0 0

What this tells the operating system is that I want to mount a network share “//192.168.3.101/server-share/” into the folder “/home/ryan/fileserver”.  I do this with the software package “smbfs.”  You’ll need your username and password for the target machine.  Save the fstab file and close it.

5) The last step is to go ahead and mount the share.  This is also done from the terminal using the following command:

sudo mount -a

This tells the operating system to remount everything in your fstab file.  Your file share should now show up as a drive on your desktop and you should be able to read and write to it directly as if it were a drive on your computer.

 236 total views,  4 views today

LinuxMint: Keyboard Shortcuts to Move Windows Between Monitors

If you don’t have multiple monitors hooked up to your desktop computer, you’re really missing out.  Having dual monitors is a delight when it comes to being able to see more than one window and work even faster.  And to make the experience even more enjoyable, Ubuntu variants of Linux, including LinuxMint, my new Linux distribution of choice, come pre-installed with CompizConfig Settings Manager, which has a nice windows management utility built in that allows you to use keyboard shortcuts to move windows between monitors.  So, for instance, let’s say you’ve got your browser up on the left monitor, but you want to move it to the right monitor so you can have it open at the same time as you work on a spreadsheet.  You could shrink the browser window then drag it to the other monitor.  But that would require several several clicks and dragging your mouse.  Wouldn’t it be nice if you could simply hit a keyboard combination that moved your entire window from one monitor to the other, while still maximized?  The “Put” utility in CompizConfig allows you to do this.  Here’s how:

1) Open CompizConfig Settings Manager (it’s pre-installed in LinuxMint).  If you’re running Ubuntu, you may have to install it using the software center or synaptic:

opening CompizConfig Settings Manager in LinuxMint (click to enlarge)

2) With the settings manager open, scroll down to the section labeled “Window Management.”  You should see “Put” as an option.  Select the box next to it, then click on “Put” to enter the settings:

find “Put” in the CompizConfig Settings Manager window (click to enlarge)

3) Inside the “Put” submenu you’ll see several options.  The one you want to move windows between monitors is “Put within viewport,” which is the fourth from the top.  Select the + sign next to it to see the options.  While you can “Put” your windows in lots of locations, I primarily just use two: “Put Left” and “Put Right”.

the “Put” settings submenu (click to enlarge)

(In the above image I had already set up my key combinations.)

4) To set up a key combination to use the “Put” utility, simply click on the button labeled “Disabled” across from the relevant command that shows a small keyboard (you can create key combinations using mice as well, which are just below the keyboards).  That brings up this option:

click “enabled” to tell CompizConfig to use the keyboard combinations

5) Select “enabled” and you’ll see this:

set your keyboard combination here

6) Click on “Grab key combination” and another window will pop up that will detect the keyboard combination shortcut you want to use to put your windows across monitors.  I use “Alt+Super+left” for moving windows to my left monitor and “Alt+Super+right” to move windows to my right monitor (as shown in the image above).  Once you enter your keyboard combination, hit “OK” in the prompt, set up any others you want to use, and then click on “Back”.  Make sure you’ve selected the checkbox next to “Put” then close CompizConfig Settings Manager.

7) You can now try out your keyboard combination by selecting a window and using your combination to move it across monitors.  FYI, if your window is maximized, you’ll have to hit the combination twice.  When you hit it the first time, the window will move just a little bit to indicate to you that the software knows you’re trying to move the window but that the window is maximized.  Hit it again quickly and the window will jump to your other monitor and maximize itself on that monitor as well, beautifully taking into account panels and monitor size.  I show the actions in the video below:

Note: Another very useful keyboard combination utility that comes built in with CompizConfig Settings Manager is the “Grid” utility which allows you to move a window to different areas of your monitors as well.  This utility is located in the same area as the “Put” utility.  It is activated by default.  The keyboard combinations are “Ctrl+Alt+keypad numbers”.  So, for instance, to move a window to the center of a monitor, hit “Ctrl+Alt+KP5,” which is the center key in your keypad.  To move it to the right, use KP6, etc.  Grid has several levels of alignment built in, which you can see by hitting the combination repeatedly until you get the window to the size you want, as shown in the video below.

 874 total views,  4 views today