rsync - problem connecting to network external drive
I have an external USB 350MB external drive connected to a Wireless Modem/Router. The drive is formatted ntfs and is almost empty. I can use Krusader or Dolphin to access and transfer files to and from the drive from any computers on the network. The address of the drive is smb://readyshare/USB_Storage/NetShare. The drive shows up correctly in Gigolo.
I want to set up an automatic backup procedure using rsync. I have the following code ; Code:
#!/bin/bash Quote:
I am using bash in Xubuntu 12.04. rsynch works well across the network in all other cases but not to the USB drive. |
Try explicitly mounting your NTFS formatted external drive and using the mount point in place of smb://readyshare/USB_Storage/NetShare. This may help. https://help.ubuntu.com/community/Mo...dowsPartitions
|
I have already done this. I can use rsync to transfer files each way to the drive when mounted so the fact that it is ntsf does not seem to matter.
The modem will not recognise the drive if formatted to anything but ntfs or fat32. I want the drive to be connected to the router so that it is a backup drive for each computer on the network and so that certain common files are available across the network. Everything works fine when I use Dolphin, Thunar or Krusader. It is just rsync that it causing a problem. Thanks for your reply Alan |
I now have a better picture of your situation. You are going to need to rethink your strategy as rsync is not the tool to achieve your goal directly as it does not handle the SMB protocol.
Perhaps you could use rsync to build a directory on a computer on the network, then copy this directory to your external USB disk attached to the modem/router. |
Yes I will do that. I was hoping to use rsync in a script that could be run automatically under cron.
I will play around a bit more and try your strategy. Thanks for your help |
Is there any reason that you cannot mount the network share in your cron script just before running rsync and umounting it after?
|
Quote:
Code:
mount -t cifs -o guest //192.168.0.225/bantam /mnt/smb Paul. |
@toothandnail
Thanks for your reply. I can not get the external drive to mount. I am using a Netgear DGND3700 wireless modem/router. The IP address of the modem is 192.168.0.1 - that is what I use to get in from Firefox. In the "USB Storage Advanced Settings" I have: Network/Device Name: readyshare Access Method: Network Connection: Link: \\readyshare Available Network Folders: Shared Name: readyshare\USB I assume that the back slashes are for Windows users and have used forward slashes instead. I created a mount point mkdir USB - then I tried: mount -t vfat -o guest //192.168.0.1//readyshare/USB USB mount -t vfat -o guest //192.168.0.1//readyshare USB mount -t vfat -o guest //192.168.0.1/readyshare/USB USB mount -t vfat -o guest //192.168.0.1/readyshare USB In all cases I get Quote:
Any other suggestions? TIA Alan |
I have a Netgear DG834GUv5 wireless modem/router. The external USB drive is only accessible by FTP. I think that your Netgear DGND3700 wireless modem/router will be similar in that the external USB drive cannot be remotely mounted.
|
@toothandnail
Thank you for your reply and suggestion. I cannot get the drive to mount. I am using a Netgear DGND3700 wireless Modem/Router. Its IP address is 192.188.0.1 which is what I use to access the modem from Firefox. For testing I am using a 4GB USB Flash drive formatted to fat32. In the Modem I have: Quote:
I created a mount point in my home directory - mkdir USB - then I tried Quote:
Quote:
Quote:
TIA, Alan |
Sorry about the double post - I don't know what went wrong!!
@allend As I said I can access the drive through the file managers and the address in there is smb://readyshare/USB. I can transfer files each way by dragging and dropping them without using ftp Within the modem settings there are optioins and addresses for accessing the drive directories directly, through http (directly), https (over the Internet), ftp (directly) and ftp (over the internet). Since the file managers find the drive directly using smb, I want to do the same by mounting it and accessing it. |
Try using mount -t cifs.
|
This is what I get -
Quote:
|
Looking at what you've posted, I think you're addressing the device incorrectly:
Code:
USB Storage: Advanced Settings: Network/Device Name: readyshare Code:
mount -t smb //readyshare/USB USB -o guest Code:
mount -t smb //192.168.0.1/USB USB -o guest I've not used a Netgear router for a while, but from what I remember, it should provide local DNS, so you could check it. If you've got Samba installed, try entering 'smbtree' from the command line. Hit return when it prompts for a password, and see what the command shows for your network. If it shows the readyshare name, you should be able to mount it using the name direcdtly, if not, you will need to use the IP. But using both is most likely the reason the network can't locate the device. Edit/ Sorry, just had a closer look at your first mount command. '-t vfat' is definitely wrong. When you're accessing the device over the network, it will be either 'smb' or 'cifs', the latter being the best option. /Edit Paul. |
Fantastic!!!!
From your example I got Quote:
Quote:
Quote:
So I tried without -o guest and it mounted without the Warning message I am going to try it in fstab In fstab I tried Quote:
Is there any startup script that I could put the mount statement into to get the drive mounted on startup? I have tried ~/.profile and /etc/bash.bashrc but I am just guessing Thanks for all your help |
:) Glad it worked....
I suspect the reason it failed to work in fstab is the lack of an absolute path, but there might also be issues with network startup on boot. Anyhow, great that you've to it working. Paul. |
Quote:
There may be a problem with the network layer not being fully operational when rc.local is run. I suspect that would depend mainly on whether you're using a wired or wireless connection to the router. If its wireless, the mount command in rc.local will probably not work - Network Manager will only run when you log in as a user, which will be after rc.local has run. Quote:
Paul. |
I found this - http://opensuse.swerdna.org/susesambacifs.html#fstab
I put Quote:
I will have to switch the modem on and let it boot fully so that the drive is available before starting the computers. No problem!! Thanks again. Alan |
All times are GMT -5. The time now is 12:52 PM. |