Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 90316 invoked from network); 22 Nov 2005 17:39:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Nov 2005 17:39:43 -0000 Received: (qmail 935 invoked by uid 500); 22 Nov 2005 17:39:38 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 641 invoked by uid 500); 22 Nov 2005 17:39:36 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 630 invoked by uid 99); 22 Nov 2005 17:39:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2005 09:39:36 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [146.197.27.40] (HELO barrierb241.nike.com) (146.197.27.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2005 09:41:08 -0800 X-Server-Uuid: BDE2CC8B-9671-48D4-9A25-CA756DA0A621 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: Backup before deploy Date: Tue, 22 Nov 2005 09:39:03 -0800 Message-ID: <200511221739.jAMHdEWR002307@barrierb241.nike.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Backup before deploy Thread-Index: AcXvH0BJdHTgbhk2Sp6xKPW6iNoERQAa6RAA From: "Anderson, Rob (Global Trade)" To: "Ant Users List" X-OriginalArrivalTime: 22 Nov 2005 17:39:03.0334 (UTC) FILETIME=[A12A8C60:01C5EF8B] X-WSS-ID: 6F9D88321K81118591-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N You should setup sudo on the remote side to allow you to execute the commands you need to run as the user you need to run them as.=20 The command in the ant sshexec task would look something like this: Check out the sudo manual... http://www.courtesan.com/sudo/ -Rob Anderson > -----Original Message----- > From: keith wong [mailto:ckeiwong@yahoo.com]=20 > Sent: Monday, November 21, 2005 4:02 PM > To: user@ant.apache.org > Subject: Backup before deploy >=20 > Hello, > I need control remote host thru ssh to tar all backup file,=20 > but I get into problem of "su - " command after ant =20 > in. I not sure how to keep ssh session and process two steps=20 > command to archive. Here is steps I need to make: > 1. SSH to remote. > 2. su to our user.=20 > 3. tar all backup and save it to privielge restricted=20 > location allowed from that "su"ed user. > 4. compress the tar to save space. > =20 > Thank you for any input. > =20 > Regards, > Keith >=20 >=20 > =09 > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For=20 > additional commands, e-mail: user-help@ant.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org