Using a remote disk with Syncrify
Often companies invest in NAS devices to store large data and want to use it as the user repository when Syncrify is running on a Windows machine. This page demonstrates how to use a disk on Linux or NAS from a Windows machine. It also talks about the pros and cons of this approach.
NOTE: Most NAS devices run on a stripped down version of Linux. Therefore, these instructions are same if you are using a NAS device or a Linux machine.
- Syncrify server is running on Windows (Any Windows OS)
- You want to use the disk on Linux/NAS
- Samba is installed on Linux/NAS
Using UNC-style paths
Syncrify server runs as a service on Windows machine. The concept of mapped drives on Windows is associated with user login - meaning when you login to your account on Windows, the OS creates this map. Therefore, mapped drives are not available to program running as service.
A solution to this limitation is to use UNC style path for user repository rather than a drive letter. For example: \\LinuxBox\SharedFolder. Another important information to keep in mind is that this UNC path should NOT prompt for a User ID/Password when connecting. Services on Windows run in the background and there is no way for them to ask for user credentials.
The goal of this exercise is to configure Samba on Linux so that it does not ask for a user id and password before letting a Windows machine to access its files.
You will be making changes to /etc/samba/smb.conf file on your Linux machine. We recommend you create a backup of this file in case you need to rollback.
Modifications to smb.conf
Because we are going to make samba security insecure, make sure only your local network can access samba service. To do so, open and edit /etc/samba/smb.conf
$sudo vi /etc/samba/smb.conf
and set interfaces to lo and your local network interface. In this example: eth1.
interfaces = lo eth1
Now, modify samba default security by changing the security variable: security and make sure it is set to share instead of user and that guest account is enabled:
bind interfaces only = true
security = share
guest account = nobody
Now, we can create a share to be accessible from your Windows machine:
comment = Shared folder for Syncrify
path = /path/to/dir/to/share
browseable = yes
read only = yes
guest ok = yes
Ensure the permissions are set correctly to allow read and write to this folder.
chmod 577 /path/to/dir/to/share
If everything is fine, it is time to reload samba service to have your new configuration taken into account:
$sudo /etc/init.d/samba reload
Disadvantages of using a remote disk
Syncrify uses the rsync algorithm to backup, which tries to minimize network traffic at the cost of local disk I/O and CPU. When user repository is located on a remote machine, you are introducing a third machine into the picture and therefore, the disk I/O that is supposed to be local is now on a remote machine.
This increases local traffic on your network and may slow down the backups, particularly on a slow network.