Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.