Linux / UNIX Tech Support Forum
This is a discussion on Script To Copy Files From Windows XP To Linux Server within the Shell scripting forums, part of the Development/Scripting category; Hi All, I am a newbbie here, first of all, kudos toall theadministrator of this forum site. They have don ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi All,
I am a newbbie here, first of all, kudos toall theadministrator of this forum site. They have don very great. And also all the users and the urus ae are fanstastic. I am very happy to be a member here. I have this problem in my compnay which I was give 2days to solve unfailingly. here it goes. On Our Window XP based playout server are some AVmedia files for playout,exported from the Production server which is rhel4 based via a network drive. Now I am being tasked to write a shell script to Automate copying of unused Avmedia files from the window xp based playout server to a RHEL4 DV station backup system at a particular time and also return files at another time t. The unused AV media files to be copied by shell scripts will be in one folder and it will return to different folder on the same window xp based playout server. Please kindly help me to write the script as I have ever written any automated script before. Thanks all |
| Sponsored Links | ||
|
|
|
|||
|
ok. There is a window xp base production server contained video files for play out. There is another server which is a linux base server placed in the network of the window xp based production server. I normally copy the files in the windo xp production server to the linux server for storage/backup and also compy it back to the window xp server at a time t. Now I want a shell script to automate this process. please help
|
|
||||
|
Hmm,
You may want to look into samba for the linux server. Than you can mount the linux partition on windows. Then you can setup a Windows Scheduled task that can move the files to the samba partition via a Windows batch file. This is just a suggestion. Please have a look at these links. Also you can look into cygwin which allows you to execute unix commands on Windows. You can then mount the samba partition on the Windows box and run a rsync at any time interval. A bit old. But a goodie: Configuring a Samba Server To install Cygwin: Cygwin Information and Installation If anyone else has a shell script. Feel Free to paste it. HTH, jaysunn |
|
||||
|
Quote:
Code:
mkdir -p /mnt/windowsxp mount -t smbfs -o username=xpusername,password=XpPassword //windowsxp/sharename /mnt/windowsxp cd /mnt/windowsxp cp *.avi /home/you/backup/ cd - umount /mnt/windowsxp
__________________
Vivek Gite Linux Evangelist |
|
|||
|
HI,
tHANKS FOR THE SUPPORT. iTS LIKE YOU DO NOT UNDERSTAND ME. THE FILES ARE ON A pLAYBOX PLAYOUT SERVER AND ITS WINDOW XP OPERATING SYSTEM ON IT. SO THE OTHER SYSTEM FOR STORAGE IS A DV STATION LINUX OPERATING SYSTEM RUNNING ON IT. SO I NEED A A SCRIPT TO AUTOMATE THE PROCESS OF COPING FILES FROM THE WINDOW XP PLAYOUT SERVER AT A PARTICULAR TIME T AND ALSO RETURN FILES FROM THE LINUX BASE DV STATION TO THE WINDOWS XP PLAYOUT SERVER AT A PARTICULAR TOME T. a SHELL SCRIPT IS NEED TO AUTOMATE THIS PROCESS OR ANY OTHER THING YOU KNOW IT COULD AUTOMATE THIS PROCESS. THANKS A LOT |
|
||||
|
here is the modified script for you
#!/bin/bash mkdir -p /mnt/windowsxp mount -t smbfs -o username=xpusername,password=XpPassword //windowsxp/sharename /mnt/windowsxp cd /mnt/windowsxp cp *.avi /home/you/backup/ #the below command will stop/sleep for 300 seconds, so you can specify your time between your data coping form xp to linux and linux to xp. sleep 300 cd /ur/files/location/on/linux cp *.avi /mnt/windowsxp cd - umount /mnt/windowsxp ######### save this file and schedule a cronjob in linux, so that the script will execute at your desired time. please current me if i am wrong |
![]() |
| Tags |
| backup windows files to linux , backup xp files to rhel , linux and windows file sharing , windows rhel backup |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linux Shell Script to upload log files to Windows XP based FTP Server | stefanuscyberia | Shell scripting | 6 | 18-11-2009 01:29 PM |
| configuring Linux sendmail server and Windows Exchange server 2k3 so they share mails | amit.rhce | Mail Servers | 2 | 10-09-2009 01:43 PM |
| configuring Linux sendmail server and Windows Exchange server 2k3 so they share mails | amit.rhce | Windows Xp/2000/2003 server administration | 0 | 13-06-2009 06:43 PM |
| How to copy and paste files in FreeBSD | enochalbert | All about FreeBSD/OpenBSD/NetBSD | 1 | 01-09-2008 07:12 PM |
| How to copy . files from current directory | ricc | Linux software | 1 | 10-06-2006 09:23 PM |