FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 07-21-2008, 02:09 PM
"Mad Unix"
 
Default copy

I want to copy all the following files/folder/subfolders under
/usr/local/apache/htdocs to a remote server within this directory
/var/www/html/

Am I correct with this command, or far away offff



tar zcvf -* /usr/local/apache/htdocs | ssh root@1.2.3.4 "cat > /var/www/html/htdocs.tar.gz"

Thanks
--
Your search - madunix - did not match any documents.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-21-2008, 02:12 PM
"Bo Lynch"
 
Default copy

On Mon, July 21, 2008 10:09 am, Mad Unix wrote:
> I want to copy all the following files/folder/subfolders under
> /usr/local/apache/htdocs to a remote server within this directory
> /var/www/html/
> Am I correct with this command, or far away offff
>
> tar zcvf - /usr/local/apache/htdocs | ssh root@1.2.3.4 "cat >
> /var/www/html/htdocs.tar.gz"
>
> Thanks
>
> --
> Your search - madunix - did not match any documents.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
You can also do a scp -prC /usr/local/apache/htdocs/
root@1.2.3.4:/var/www/html/htdocs/ if you do not need to archive the
files.
Bo

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-21-2008, 03:20 PM
Tom Brown
 
Default copy

I want to copy all the following files/folder/subfolders under
/usr/local/apache/htdocs to a remote server within this directory
/var/www/html/

Am I correct with this command, or far away offff

tar zcvf - /usr/local/apache/htdocs | ssh root@1.2.3.4
<mailto:root@1.2.3.4> "cat > /var/www/html/htdocs.tar.gz"


Thanks


rsync over ssh is good for network copies as it preserves permissions
nicely if you ask it


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-21-2008, 04:14 PM
"Mad Unix"
 
Default copy

How would you do the
tar zcvf - */usr/local/apache/htdocs | ssh root@1.2.3.4 <mailto:root@1.2.3.4> "cat > /var/www/html/htdocs.tar.gz"



with rsync and the to have it* in the crontab* to run everyday.

Thanks

On Mon, Jul 21, 2008 at 5:20 PM, Tom Brown <tom@ng23.net> wrote:




I want to copy all the following files/folder/subfolders under /usr/local/apache/htdocs to a remote server within this directory /var/www/html/

Am I correct with this command, or far away offff



tar zcvf - */usr/local/apache/htdocs | ssh root@1.2.3.4 <mailto:root@1.2.3.4> "cat > /var/www/html/htdocs.tar.gz"




Thanks




rsync over ssh is good for network copies as it preserves permissions nicely if you ask it



_______________________________________________

CentOS mailing list

CentOS@centos.org

http://lists.centos.org/mailman/listinfo/centos



--
Your search - madunix - did not match any documents.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-21-2008, 05:09 PM
"Bo Lynch"
 
Default copy

On Mon, July 21, 2008 12:14 pm, Mad Unix wrote:
> How would you do the
> tar zcvf - /usr/local/apache/htdocs | ssh root@1.2.3.4
> <mailto:root@1.2.3.4>
> "cat > /var/www/html/htdocs.tar.gz"
>
> with rsync and the to have it in the crontab to run everyday.
>
> Thanks
>
> On Mon, Jul 21, 2008 at 5:20 PM, Tom Brown <tom@ng23.net> wrote:
>
>>
>> I want to copy all the following files/folder/subfolders under
>>> /usr/local/apache/htdocs to a remote server within this directory
>>> /var/www/html/
>>> Am I correct with this command, or far away offff
>>>
>>> tar zcvf - /usr/local/apache/htdocs | ssh root@1.2.3.4 <mailto:
>>> root@1.2.3.4> "cat > /var/www/html/htdocs.tar.gz"
>>>
>>> Thanks
>>>
>>
>> rsync over ssh is good for network copies as it preserves permissions
>> nicely if you ask it
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>
>
>
> --
> Your search - madunix - did not match any documents.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
If you want a simple rsync then you can do
rsync -av /usr/local/apache/htdocs/ -e root@1.2.3.4:/var/www/html/htdocs/

If you want to to compress it first then do

tar zcvf htdocs.tar.gz /usr/local/apache/htdocs
rsync -av /usr/local/apache/htdocs/htdocs.tar.gz -e
root@1.2.3.4:/var/www/html/htdocs/

Bo

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-21-2008, 07:03 PM
"Dan Carl"
 
Default copy

-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org]On Behalf Of Mad Unix
Sent: Monday, July 21, 2008 11:14 AM
To: CentOS mailing list
Subject: Re: [CentOS] copy


>How would you do the
>tar zcvf - /usr/local/apache/htdocs | ssh root@1.2.3.4 <mailto:root@1.2.3.4> "cat > >/var/www/html/htdocs.tar.gz"

>with rsync and the to have it in the crontab to run everyday.

>Thanks

My suggestion:
Setup SSH to use keys.
Google ssh keys for explaination.
Read some of the many tutorials on rsync out there.

Tip: if you're going to run the script daily you should consider setting up a lock file.
By using a lock file you won't have to worry about the script completing before the next one starts.

If you're impatient email me and I'll give you a copy of the script I wrote.

PS
Please post questions in text format not html.

Dan


<snip>




--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org