Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cron tar through NFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vyeperman
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2003
Posts: 89

PostPosted: Fri Mar 26, 2004 4:22 am    Post subject: cron tar through NFS Reply with quote

I'm looking to write a cron script that will tar up all my partitions then transfer them to anothor computer via NFS.
Q1: what is the best language to write it in? (hopefully not perl or something that will take awhile to learn)
Q2: Is there already a script out there that does this?
Thanks in advance
_________________
-Vyeperman
Back to top
View user's profile Send private message
teknomage1
Veteran
Veteran


Joined: 05 Aug 2003
Posts: 1239
Location: Los Angeles, CA

PostPosted: Fri Mar 26, 2004 5:59 pm    Post subject: Reply with quote

First to answer number 2, there are a fair number of backup scripts out on the internet or even here on the forums, just search w/ the terms 'tar' and 'backup' . From there you just need to look in man cron for the syntax to get it to run at your desired interval.

to answer number one, the simplest way to write one is using shell script, take this bash example:
Code:
 mount nfsshare #one described in fstab
tar -cf rmotemachine:wherever/mybackup /.
umount nfsshare

Now that's a horrible way to do things and I haven't used nfs in a year or so but you get my drift. Your general steps are mounting the NFS share, run tar, copy the file, unmount the share. man nfs describes how to put an nfs share description into fstab. You can set up anything to run as cron as long as it's executable.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum