LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2004, 09:39 AM   #1
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
mounting network drive?


Here is whats going on. My dad uses my laptop during the weekend when I do not need it for work. He is a preacher and I would like to make a backup of what is said on sunday. Usually he is in his office next to my lab untill about 12:00AM. The Laptop is running XP Home and I have his documents to go to /shared documtents/jmidgett . How can I have my RH9 Samba Server connect to his shared drive on the XP machine and copy all files in that directory over to /home/midgett/jmidgett on the linux box. Once in /home/midgett/jmidgett I would like a back up to run and copy everything in /jmidgett to a zip drive which is /mnt/zip or /dev/sda4.

I have putty installed on the XP laptop so I am sure that I can teach my dad how to run a script from a SSH login. Can some one here help me with this?

Is there a better way? Basically he needs a copy on the computer to take with him and I need a copy on the server. How can I do this for my dad that mostly just knows how to push the power button on and off.
 
Old 03-02-2004, 10:14 AM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Is your Linux server on 24/7? If so you could schedual a task using the backup agent in XP. Set XP to mount the share on the Linux box. Then have the backup agent to backup to the share.

A Linux script would look like this (named Sunday_files).

#!/bin/bash

# mount the Winodws share
mount -t smbfs -o username=john,password=dowe //<pc name>/<share name> /mnt/jmidgett

# copy files over
cp -R /mnt/jmidgett/* /home/jmidgett/jmidgett

# unmount share
umount /mnt/jmidgett

# mount zip drive
mount /mnt/zip

# backup files to zip drive
tar cvfz /mnt/zip/sunday_files.tar.gz /home/jmidgett/jmidgett
# or
cp -R /home/jmidgett/jmidgett /mnt/zip

I am not sure if RH mount the zip as read/write, if not you'll have to edit your /etc/fstab to look something like this:

/dev/hda1 /mnt/zip vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 1 0

Then you'll need to addd this to a cron job if this is to be done every day. Off the top of my head I do not know how to do this. This would be better than have you dad run it, since people forget.

This is all off the top of my head, so if you have any problems let me know.
 
Old 03-02-2004, 10:29 AM   #3
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Original Poster
Rep: Reputation: 30
Yes the server is on 27/7

Now I guess that I need to lean scripting huh?

if I do a test file how do i change it to run as a script.
Chmod?
 
Old 03-02-2004, 11:11 AM   #4
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
Sorry, i forgot to tell you that. Just chmod +x <file name>, that make it executable.
 
  


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
Mounting a network Drive ruslombia Linux - Networking 1 08-28-2005 04:17 AM
Mounting a network drive DanW85 Linux - Newbie 3 03-28-2005 04:23 PM
mounting network drive viper52b Linux - Networking 2 03-10-2004 12:59 PM
mounting network drive Canadian_2k2 Linux - Networking 4 01-04-2004 11:58 PM
mounting a network drive... Sonny Linux - Security 6 01-24-2002 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:22 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
Open Source Consulting | Domain Registration