LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 07-12-2005, 09:04 AM   #1
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Rep: Reputation: 15
backup to windows share


Is there a way to backup a directory with tar to a windows share over a network?
 
Old 07-12-2005, 09:08 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
( tar c /dir/to/copy ) | ssh -C user@remote 'cd /where/to/ && tar x'

How about that?
 
Old 07-12-2005, 09:09 AM   #3
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
how about you mount the share with sambaFS and then just simply copy to it. Create the tar localy and copy localy
 
Old 07-12-2005, 09:31 AM   #4
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by marghorp
how about you mount the share with sambaFS and then just simply copy to it. Create the tar localy and copy localy
Sounds like a good option, how do I mount the share locally with Samba?
 
Old 07-12-2005, 12:31 PM   #5
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
First you have to create a share in your windows box. I hope you know how to do that. If not, ask, and we'll tell you.

Then see if you have samba installed. try running smbclient or which smbclient to determine this.

if you have samba installed, whooohoo. If not, you will have to install it.

Anyway, if you do have samba installed. see man smbclient on how to access a windows share from linux.

Then you can add a line to your /etc/fstab file to mount the share automatically at boot time.

You can mount the share with the mount command as well, like this:

mount -t smbfs \\IP_number\share_name /mountpoint
 
Old 07-12-2005, 12:37 PM   #6
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by marghorp
First you have to create a share in your windows box. I hope you know how to do that. If not, ask, and we'll tell you.

Then see if you have samba installed. try running smbclient or which smbclient to determine this.

if you have samba installed, whooohoo. If not, you will have to install it.

Anyway, if you do have samba installed. see man smbclient on how to access a windows share from linux.

Then you can add a line to your /etc/fstab file to mount the share automatically at boot time.

You can mount the share with the mount command as well, like this:

mount -t smbfs \\IP_number\share_name /mountpoint
sounds good, I'm not in front of my linux box now, but I assume the smbclient manual will show me the syntax for my /etc/fstab file?

edit:
I found more info online, but I guess I never conpiled support for smbfs in my kernel.

Last edited by jcombs_31; 07-12-2005 at 03:59 PM.
 
Old 07-12-2005, 05:13 PM   #7
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
That depends on what distro you are running or what kernel you have. Anyway, now is a good time to start diving into kernel compiling or even easier, compile only a module and use it. It's so much easier and faster
 
Old 07-12-2005, 05:40 PM   #8
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by marghorp
That depends on what distro you are running or what kernel you have. Anyway, now is a good time to start diving into kernel compiling or even easier, compile only a module and use it. It's so much easier and faster
can I compile the module without recompiling my whole kernel?
 
Old 07-12-2005, 05:58 PM   #9
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Yes, you can compile SMBFS support as a module instead of recompiling the entire kernel.
 
Old 07-12-2005, 06:03 PM   #10
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
And in addition to what marghorp said to put into the fstab, you may also need to add a username and password to be able to log on to the Windows share.

The problem with that is the password would be in plain text in the fstab file, for anyone with read access to that file.

To address that, take a look at this guide:

Mounting SMBFS shares permanently

This covers the general process of mounting the share, but also has a section that deals with security, and will give you a way to hide the username and password so only the root user can see it.
 
Old 07-12-2005, 06:23 PM   #11
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by MS3FGX
Yes, you can compile SMBFS support as a module instead of recompiling the entire kernel.
any more details you could provide would be nice. Please be as specific as possible.
 
Old 07-12-2005, 06:31 PM   #12
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Well, did you compile your current kernel yourself, or are you using the stock kernel?
 
Old 07-12-2005, 07:06 PM   #13
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by MS3FGX
Well, did you compile your current kernel yourself, or are you using the stock kernel?
I did myself a while back, I believe 2.6.10
 
Old 07-12-2005, 09:47 PM   #14
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Well then, if you did it yourself, you should already have the source on the machine, and assuming you didn't do a "make clean" or anything, it is going to be mainly compiled already.

So all you have to do is select SMBFS as a module from the setup. Either "make menuconfig" or "make xconfig", whatever you use.

It is under:

File Systems -> Network File Systems -> SMB file system support

Just select that as a module, then save the configuration, get back to the console and do:

make modules
make modules_install

Then the module should be ready to use.
 
Old 07-13-2005, 08:34 AM   #15
jcombs_31
Member
 
Registered: Dec 2004
Distribution: Slackware
Posts: 104

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by MS3FGX
Well then, if you did it yourself, you should already have the source on the machine, and assuming you didn't do a "make clean" or anything, it is going to be mainly compiled already.

So all you have to do is select SMBFS as a module from the setup. Either "make menuconfig" or "make xconfig", whatever you use.

It is under:

File Systems -> Network File Systems -> SMB file system support

Just select that as a module, then save the configuration, get back to the console and do:

make modules
make modules_install

Then the module should be ready to use.
Ok, thanks, I'll try that when I get home later.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux Backup to Samba share on Windows NTFS DBThomson Linux - General 1 09-23-2005 04:01 AM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 09:23 AM
Windows Share Sn7 Linux - Networking 4 07-02-2004 02:27 AM
smb windows share need help pissy_pants Linux - Networking 4 09-04-2003 02:37 AM
Windows Share plisken Linux - Networking 7 07-21-2003 01:43 AM


All times are GMT -5. The time now is 10:53 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration