This is how I set up a Pi Zero W to save DSLstats Snapshots and DataStore to a NAS. It may not be the most elegant solution, but it works for me! I have removed personally identifying info, so you will need to modify where necessary to fit your situation.
Background Info: My NAS has a folder available to all registered users, named "GoFlex Home Public".
1. On the NAS, in "GoFlex Home Public" create a folder named "DSLstats", and within that create two further folders named "DataStore" and Snapshots" respectively.
2. On the Pi create a folder to act as the local mount point for the NAS.
mkdir /home/pi/NAS
3. Create a "Credentials" file
sudo nano /home/pi/.NAScredentials
This file has only two lines:The items in bold should be changed to the appropriate ones registered on the NAS.
4. Change the file permissions:
sudo chmod 600 /home/pi/.NAScredentials
5. Modify the file /etc/fstab (after making a backup), by appending the following line
//192.168.xxx.xxx/GoFlex\040Home\040Public/DSLstats /home/pi/NAS cifs credentials=/home/pi/.NAScredentials,sec=ntlm,vers=1.0,rw,file_mode=0777,dir_mode=0777
6. Check that the NAS is mounted correctly by fstab
sudo mount -a
7. In DSLstats>Configuration>Snapshots, change the Snapshots directory to /home/pi/NAS/DSLstats/Snapshots
8.In DSLstats>Configuration>Data Store, change the location of the data store to /home/pi/NAS/DSLstats/DataStore
9. Reboot the Pi.
I hope this helps.
Edit: Removed wrong part of path in steps 7. & 8.
Many thanks to Westie for posting this detailed explanation ref. mounting a Windows folder on a RPI.
However, I am still struggling with the command line format within the
/etc/fstab file, keep getting a syntax error from the added command line when running the "
sudo mount -a" command, won't mount.
Have tried many possible permutations of the command including configuring guest access to eliminate any possible username or password issues, guidance found here:
https://wiki.ubuntu.com/MountWindowsSharesPermanentlyMy NAS setup is:
WDMyCloud, 192.168.0.**, \Public\DSLStats\DataStore & Snapshots
Not aware that the NAS has any password requirement, assuming that the username is WDMyCloud (or use IP address)
The final objective of the exercise is to get DSLStats web upload facilities working to my NAS or Win PC hard disk which is not possible at present.
Any suggestions appreciated.