LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   backup from remote server (http://www.linuxquestions.org/questions/linux-software-2/backup-from-remote-server-739052/)

ust 07-09-2009 08:19 PM

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

billymayday 07-09-2009 08:39 PM

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

ust 07-13-2009 04:22 AM

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

billymayday 07-13-2009 09:41 PM

Hence the ssh comment. Something like

Code:

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


All times are GMT -5. The time now is 11:57 AM.