LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-05-2012, 10:58 AM   #1
glennbtn
Member
 
Registered: Dec 2009
Posts: 154

Rep: Reputation: 18
Rsync to Nas box


HI All

I currently running rsync to a nas box using

mount -t cifs //192.168.88.253/share/masterdocs -o username=admin,password=password /mnt/masterdocs

rsync -avzHK --delete-after /home/master-docs/ /mnt/masterdocs/ |tail -n 50 >/backup-log/masterdocs-backup.txt

The issue I have is that it seems to be saving to the /mnt/masterdocs folder and running out of space on the server. Is there anyway I can backup straight to the nas box without mounting to stop this issue happening.

Thanks

Glenn
 
Old 07-05-2012, 12:27 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,692

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
What distribution/version are you running?

Without a lot of information to go on it looks like the NAS is not actually being mounted. Are you running the posted commands from a shell script?
 
Old 07-06-2012, 01:45 AM   #3
glennbtn
Member
 
Registered: Dec 2009
Posts: 154

Original Poster
Rep: Reputation: 18
Sorry running ubuntu 10.4 server.

The commands are running from a shell script

Thanks

Glenn
 
Old 07-06-2012, 08:12 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,692

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
I assume that you are not logged in as root so are you using sudo in your script? i.e.
Quote:
sudo mount -t cifs //192.168.88.253/share/masterdocs -o username=admin,password=password /mnt/masterdocs
Can you successfully mount the share by typing it in at the command line vs running from a shell script?
 
Old 07-06-2012, 09:08 AM   #5
glennbtn
Member
 
Registered: Dec 2009
Posts: 154

Original Poster
Rep: Reputation: 18
Thanks for the reply.

This server is an internal server only so root account is enabled

If I run the command without creating the folder in mnt
root@z-push:~# mount -t cifs //192.168.88.253/share/masterdocs -o username=admin,password=password /mnt/masterdocs
mount error: can not change directory into mount target /mnt/masterdocs

If I create the folder first

root@z-push:/mnt# mount -t cifs //192.168.88.253/share/masterdocs -o username=admin,password=password /mnt/masterdocs
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Thanks
 
Old 07-06-2012, 09:49 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,692

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
FYI a mount point i.e directory must exist before you can mount a share.

It appears that you are trying to mount a subdirectory which may not work depending on the version of samba that is currently installed. So try:

Quote:
mount -t cifs //192.168.88.253/share/ -o username=admin,password=password /mnt/masterdocs

Last edited by michaelk; 07-06-2012 at 10:43 AM.
 
Old 07-09-2012, 06:35 AM   #7
glennbtn
Member
 
Registered: Dec 2009
Posts: 154

Original Poster
Rep: Reputation: 18
That worked and then for some reason the my original mount worked afterword.

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with rsync + NAS local Folder khandu Linux - Newbie 2 07-31-2011 09:30 PM
Crontab rsync does not backup to NAS device Astol Linux - Software 1 09-24-2008 12:04 AM
rsync to an off-the-shelf NAS JacekZ Linux - Networking 3 08-21-2006 08:32 PM
building a nas box irish rebel Linux - Hardware 1 07-07-2006 08:26 AM
Want to build my own NAS box HippieCat Linux - General 2 03-29-2005 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration