Cron Jobs and scripting
I am using windows as well as Linux OS. and i am new for the linux world. I want to backup the users data into the linux machine which i am treating as a server.
1) How and where the windows users will keep their weekly data and it should secure.
2) and what could be the mechanism to get data into linux (automatically)
3) Once the data are in Linux we have to run cron jobs
How cron jobs will work Please give me exact example.
If you have any shell scripting for this please help.
Cronjob to pull data from Windows users!!!
it seems you are interested in pulling the windows users data in Linux box.Am i correct?
Cronjob in linux can be set to perform certain task at designated time.You can write shell script which you can set in cron job to run on every day at 12.30 am(for example).
You just need to think how to write shell (or Perl or any other supported script) to perform your task.
In your particular case,it seems you need to decide whether you will be pulling your data from windows to Linux or you will be pushing your data from Windows to Linux.In any case DATA has be to Backed up at linux Box.Please correct me if wrong ....
so many things in a question ??
now wot i cn unsderstand is u want users data (Windows ) into ur linux server n should b secure n should bck up everywkly?? if it is true thn here we go...
first u hav to mount the windows partition into the linux machine this can be done by
mount /dev/hda1 /mnt
(if ur c drive is hda1)
but this will only mount this partition for the time till the linux rebooted
if u want to mount the file system to permantly put entry in /etc/fstab
this can be done by running
/dev/hda1 /mnt ext3 defaults 0 0
this will mount ur all data present in c drive ..when ever u strt ur m/c
now our next tareget is to back up user data
this can be done by crontab
b4 makkin any cronjob take this eg
1 * * * * echo "hello"
all 5 *'s (includin 1) hav some special meanin tht is 1 * means min 2 * means hours 3* means day 4 month 5 day of wk (o being sun) tht means above cron will dislplay hello in every one min
in ur task run followin in shell
* * * * 2 /sbin/cp /mnt/user1 /linux/usser
close the file i assume u have user1 data at C:/user1 and u want ur all data /linux/usser partition
if u want to make this folder be secure
chmod 700 /linux/usser
giving rwx permission to owner