LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 07-09-2009, 09:19 PM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Rep: Reputation: 30
backup from remote server


I'm trying to backup some txt files which elder than 10 days from remote server using scp , but it is not work , can advise how can i do it ? Thx

my command
==========
scp root@remote_server:`find /tmp/*.txt -mtime +10` .


output
======

scp: find: No such file or directory
scp: /tmp/: not a regular file
 
Old 07-09-2009, 09:39 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
try

find /tmp/*.txt -mtime +10 -exec scp {} server:/dest \;

or call it with ssh if you need to invoke the lot from the destination end
 
Old 07-13-2009, 05:22 AM   #3
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Original Poster
Rep: Reputation: 30
thx reply ,

What I want is to scp remote file to local server , but not scp local file to remote server , can advise what can i do ? thx
 
Old 07-13-2009, 10:41 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Hence the ssh comment. Something like

Code:
ssh user@remote_machine find /tmp/*.txt -mtime +10 -exec scp {} local_machine:/dest \;
 
  


Reply


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
Backup To Remote Server RabidPhilbrick Linux - Newbie 1 10-26-2008 01:39 PM
remote backup of th web server keyF Linux - Software 3 03-26-2007 08:55 PM
Remote backup server: vsftpd/SSL or openssh/sftp or... ? krog Linux - Security 3 04-25-2006 12:50 AM
Remote, automated backup: Windows --> Linux server hamish Linux - Software 1 12-07-2004 11:46 AM
Best way to backup to a Remote Snap Server kemplej Linux - Networking 1 08-31-2004 05:16 PM


All times are GMT -5. The time now is 12:37 PM.

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