Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-01-2004, 02:38 AM   #1
Registered: Aug 2004
Posts: 33

Rep: Reputation: 15
NFS or SCP in a script

I'm just after some advice with using NFS or SCP for a remote database backup using a cron job. I have a script running on my database server that backs up
the database and copies it to another server. From the other server I
then tar the backup to a tape drive connected to it. My first option is
to use an empty dsa key so I can scp without a password, Within the
script I can also ssh into the other server and run the tar command.
The second option is to have an NFS share on the other server and copy
the backup to that directory. However this means that I can't remotely
run a tar command, and I would need a cron job on both servers.

I would like to run everything in one script, but would it be better to use
NFS? Internal security isn't a big issue, and I can't connect the tape
drive directly to the database server.

Any advice would be helpful.


Old 09-01-2004, 03:57 AM   #2
Red Hat Ambassador
Registered: Aug 2003
Location: NYC
Distribution: Debian, Redhat
Posts: 73

Rep: Reputation: 15
I vote for scp with public key authentication
Old 09-01-2004, 07:19 AM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Actually neither... use rsync.. more powerful, options and better most likely to use for moving files like such.
Old 09-01-2004, 07:24 AM   #4
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
Well, scp with public key auth but how?
Old 09-01-2004, 07:25 AM   #5
Registered: Aug 2004
Posts: 33

Original Poster
Rep: Reputation: 15
By assigning empty dsa keys between the two servers.
Old 09-01-2004, 10:22 AM   #6
Registered: Aug 2004
Location: Seattle
Distribution: Red Hat es and as, Solaris, Fedora, Debian, Tru64
Posts: 45

Rep: Reputation: 15
I would use rsync with ssh and an empty passphrase.

rsync -auvze ssh username@other_server:/place/to/get/the_file local_file

then tar it off, and do some clean up.
Old 09-01-2004, 10:27 AM   #7
Registered: Aug 2004
Posts: 33

Original Poster
Rep: Reputation: 15
I think I'm going to use NFS seems the easiest option, especially I need to document this well enough for Windows users to understand.


Old 09-01-2004, 10:50 AM   #8
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
As trickykid and scissors recommended, rsync over ssh is a good option. If you don't like using empty keys for authentication, then you can use ssh-agent to store the keys.


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
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
slow NFS/SCP but fast HTTP/FTP darcon3k Linux - Networking 1 10-13-2005 05:22 AM
using scp in a script jeempc Programming 2 08-15-2004 09:47 AM
Shell Script with ssh & scp ErikJohnson Linux - Software 3 03-11-2004 04:53 PM
Shell Script with ssh & scp ErikJohnson Linux - Networking 1 03-11-2004 04:14 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration