Mounting a windows share in FreeNAS

Status
Not open for further replies.

Samwarez

Dabbler
Joined
Oct 16, 2015
Messages
10
I just set up a new FreeNAS server and I need to setup some sort of external backup. I understand that plugging in a USB external drive directly is frowned upon, so instead I have a windows machine sharing a drive on the network, I hope mount that share in FreeNAS and then just schedule a regular rsync to the mountpoint. I can access and mount the share on other windows machines so I know my credentials are right.

My problem is in the mounting for the share in FreeNAS.

I tried:
Code:
sudo mount_smbfs -I <WIN_IP> -N //<WIN_User>@<WIN_HostName>/NAS_Backup /mnt/NAS_Backup

result:
Code:
mount_smbfs: unable to open connection: syserr = Authentication error


My ~/.nsmbrc
Code:
[<WIN_HostName>:<WIN_User>]
password=<WIN_Password>


Following some guides I also tried:
Code:
mount -t cifs //<WIN_IP>/NAS_Backup /mnt/NAS_Backup -o username=<WIN_User>,password=<WIN_Password>

But all I get is:
Code:
usage: mount [-adflpruvw] [-F fstab] [-o options] [-t ufs | external_type]
       mount [-dfpruvw] special | node
       mount [-dfpruvw] [-o options] [-t ufs | external_type] special node


I guess my syntax is wrong somewhere?

Trying to troubleshoot I tried:
Code:
smbclient -L //<WIN_IP>/NAS_Backup -U<WIN_User>
Enter <WIN_User>'s password:
Anonymous login successful
Domain=[WORKGROUP] OS=[Windows 7 Enterprise 7601 Service Pack 1] Server=[Windows 7 Enterprise 6.1]

        Sharename       Type      Comment
        ---------       ----      -------
Error returning browse list: NT_STATUS_ACCESS_DENIED
Connection to <WIN_IP> failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled -- no workgroup available


I am not sure what to make of this, NetBIOS over TCP is enabled on the windows machine.

Thank you for any insight you can provide.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I think you're approaching this backwards. You can use deltacopy on a windows box to pull the data over.

Alternatively, I just run a powershell script to pull data from my CIFS shares. I have attached an example of such a script below:

Code:
# Volume Name of External Hard Drive
$VolumeName = 'OFFSITE02'

# Make sure you have enough space on the Hard Drive for the shares you're backing up
# This is an array. Separate shares by commas and enclose each share name with quotation marks
$SharesToBackup = "Requests","Shared","EA","Cat photos"
$ServerName = 'storage'

# Make sure you put in a valid log path
$LogPath = "\\storage\it\logs\OFFSITE02"

# Messy way of getting the volume's drive letter
$disk = Get-WmiObject -query "SELECT * from win32_logicaldisk where VolumeName = '$VolumeName'"
$DriveLetter = $disk.DeviceID

# Loop robocopy command 
foreach ($ShareName in $SharesToBackup){
    $SourcePath = "\\$ServerName\$ShareName"
    $LogFile = "$LogPath\$ServerName.$ShareName.$(get-date -f yyyy-MM-dd).log" #don't modify this variable

   
    # Test if disk is actually connected.
    if ($disk.DeviceID -eq $null){
        msg * "RoboBackup task not for $ShareName run - $VolumeName is not connected to the computer"
        break
    }

    else { 
        robocopy "$SourcePath" $DriveLetter\"$ShareName" /MIR /COPY:DT /Z /W:5 /R:15 /FFT /XF ntuser.* *.dat *.db *.tmp /LOG:$LogFile
    }
   
}
msg * "RoboBackup task complete"
 

Samwarez

Dabbler
Joined
Oct 16, 2015
Messages
10
It never occurred to me to pull the data that way, thank you. I will give it a shot
 
Status
Not open for further replies.
Top