Unix administration - copying files from shell to network drive

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > March 2007 > copying files from shell to network drive





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author copying files from shell to network drive
thor

2007-01-24, 7:19 pm

[Previously posted in wrong cat, sorry for spam]

Hi, I am a new unix admin.

My webserver hard drive is filling up quick and I am trying to move
some files to a networked windows server that has a burner to perform
backup.


I am not sure the command to pass in the shell to make this happen. in

windows I would map a path to the computer in question and use the
console to copy. Do I do something similar to for unix system?


I am thinking something like...
$ cp fooboo.tar //winbox1/backup


or
$ cp fooboo.tar X:/backup/


Thanks in advance.

Cezary Morga

2007-01-24, 7:19 pm

thor wrote:

> I am not sure the command to pass in the shell to make this happen. in
>
> windows I would map a path to the computer in question and use the
> console to copy. Do I do something similar to for unix system?
>
>
> I am thinking something like...
> $ cp fooboo.tar //winbox1/backup


If you're using smbfs (or whatever the name is) to mount windows shares on
unix box, or do this manualy then yes, you can simply copy the file. You
can also use smbclient (which is ftp like) to copy the file to windows
shares, though I'm not sure whether it can run in non-interactive mode. In
both cases you'll have to use samba.

You can also set some ftp server on windows machine...
--
Cezary Morga
thor

2007-01-25, 1:19 pm

illegal option -t ?


# mount -t smbfs -o username=administrator,password=fooboo
//file1/marketing/web /opt/thor
mount: illegal option -- t
Usage:
mount [-v | -p]
mount [-F FSType] [-V] [current_options] [-o specific_options]
{special | mount_point}
mount [-F FSType] [-V] [current_options] [-o specific_options]
special mount_point
mount -a [-F FSType ] [-V] [current_options] [-o specific_options]
[mount_point ...]
#
-------------------------



On Jan 24, 2:17 pm, Cezary Morga <ceza...@NOSPAMdata.pl> wrote:
> thor wrote:
>
>
> unix box, or do this manualy then yes, you can simply copy the file. You
> can also use smbclient (which is ftp like) to copy the file to windows
> shares, though I'm not sure whether it can run in non-interactive mode. In
> both cases you'll have to use samba.
>
> You can also set some ftp server on windows machine...
> --
> Cezary Morga


Todd H.

2007-01-25, 1:19 pm


That's an odd mount command to my eyes anyway.

Looks like your mount using -F for what most use -t for. Consult your
man page for details, but smbfs is the file system type.


"thor" <Bryce4@gmail.com> writes:
> illegal option -t ?
>
>
> # mount -t smbfs -o username=administrator,password=fooboo
> //file1/marketing/web /opt/thor
> mount: illegal option -- t
> Usage:
> mount [-v | -p]
> mount [-F FSType] [-V] [current_options] [-o specific_options]
> {special | mount_point}
> mount [-F FSType] [-V] [current_options] [-o specific_options]
> special mount_point
> mount -a [-F FSType ] [-V] [current_options] [-o specific_options]
> [mount_point ...]
> #
> -------------------------
>
>
>
> On Jan 24, 2:17 pm, Cezary Morga <ceza...@NOSPAMdata.pl> wrote:
>


--
Todd H.
http://www.toddh.net/
thor

2007-01-25, 1:19 pm

I tried with -F and here is the error.

"mount: operation not applicable to FSType smbfs"

I don't know anything about Samba if that has any bearing, really just
a newbie. Appreciate the help.

On Jan 25, 9:27 am, comph...@toddh.net (Todd H.) wrote:
> That's an odd mount command to my eyes anyway.
>
> Looks like your mount using -F for what most use -t for. Consult your
> man page for details, but smbfs is the file system type.
>
>
>
>
>
> "thor" <Bry...@gmail.com> writes:
>
>
>
>
>
> Todd H.http://www.toddh.net/- Hide quoted text -- Show quoted text -


Doug Freyburger

2007-01-25, 1:19 pm

"thor" <Bry...@gmail.com> wrote:
>
> I don't know anything about Samba if that has any bearing, really just
> a newbie. Appreciate the help.


I suggest three steps:

1) Go to your Windows box and use ftp to pull the files there then
delete
them on the Unix side to free up space and give you time.

2) Learn what options are available through Samba. The more common
use is to use the server side of Samba on the Unix end to export your
directory tree as SMD/CIFS then map it as a shared drive on the Windows
end.

3) Learn more Samba and get smbfs working so you can push the files
from the Unix side to make scripting easier.

Sambuh

2007-02-01, 1:18 pm

On Jan 25, 1:07 pm, "thor" <Bry...@gmail.com> wrote:[vbcol=seagreen]
> I tried with -F and here is the error.
>
> "mount: operation not applicable to FSType smbfs"
>
> I don't know anything about Samba if that has any bearing, really just
> a newbie. Appreciate the help.
>
> On Jan 25, 9:27 am, comph...@toddh.net (Todd H.) wrote:
>
>
>
>
>
>
>
>

Not sure if this will help you or not, but i do the same thing that
you are talking about. I run backups and then copy them off to a
windows share by doing the following...

I created a directory to mount the share to and then mount the share

# mkdir -p /mnt/joescomp/joe
# mount -t cifs //joescomp/joe -o username=joe /mnt/joescomp/joe

The just cp or mv files to that location...

Hope this helps.

Sir Chewbury Gubbins

2007-03-02, 1:16 pm

Sambuh the Monkey was never naughty:
>
> Not sure if this will help you or not, but i do the same thing that
> you are talking about. I run backups and then copy them off to a
> windows share by doing the following...
>
> I created a directory to mount the share to and then mount the share
>
> # mkdir -p /mnt/joescomp/joe
> # mount -t cifs //joescomp/joe -o username=joe /mnt/joescomp/joe
>
> The just cp or mv files to that location...


Or install the cygwin (spit) SSH daemon on the windows box and use scp
to copy the file over.

Choobs

--
Sir Chewbury Gubbins <chewbury.gubbins@nelefa.org>
http://www.nelefa.org - Gaming and Ramblings from the Shiny part of the world

Abu the monkey was never naughty.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com