From owner-freebsd-questions@FreeBSD.ORG Wed May 28 09:16:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C080D106564A for ; Wed, 28 May 2008 09:16:24 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id 6AA298FC1F for ; Wed, 28 May 2008 09:16:24 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1739879ywe.13 for ; Wed, 28 May 2008 02:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=0Zpgp3IgwzD1ZUaFwJsii+l4Emy5XicvV8PnYQTrxvc=; b=UWXhe6wiWGmTWzAppzy7Lm/ayEOXnTxIDvC0YIXxKM33A+KN27Xej23qE0eRpXMXTzKtZKXVEt4VMUixYUxytl8+Vf8k00XmqIHqYD9/Lkf7MLmtNd43LE1QqNyqnOaIhT1KNfG1Lnkbq72ldD6T+q+s8BlP4B6sZyNFEUsr6wE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=xtMkW4/Ewk5wcwOyqFWP7NXpi2xEVl6pSyJuCRCiPCFPlxW7N+RUhZNGkJ06ofyqK6UoZxjObqC8UphDKkjUArci15Hdw5+DnKENcTT7ZgPd2GC0mUjMT4SkO8hCeGa01cXwijVHHF9vFhooxdE7Kf49F/tLd9Yi/gEA292SPJk= Received: by 10.150.73.6 with SMTP id v6mr5338926yba.113.1211966178498; Wed, 28 May 2008 02:16:18 -0700 (PDT) Received: by 10.150.219.9 with HTTP; Wed, 28 May 2008 02:16:18 -0700 (PDT) Message-ID: <991123400805280216j136a3171y3f6e9377031fa322@mail.gmail.com> Date: Wed, 28 May 2008 12:16:18 +0300 From: "Odhiambo Washington" To: z.szalbot@lc-words.com In-Reply-To: <483D0181.5010605@lc-words.com> MIME-Version: 1.0 References: <483C8060.2070003@lc-words.com> <483C87F0.9030803@mikestammer.com> <483D0181.5010605@lc-words.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: dump and remote file fetching X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2008 09:16:24 -0000 On Wed, May 28, 2008 at 9:53 AM, Zbigniew Szalbot wrote: > Hi there, > > Need a word of advice. I use dump to backup my data. All fine. Dump saves >>> compressed *.bz2 files. Nice. All I need now is a way to copy them from the >>> server to a remote backup machine. The problem I am facing is that bz2 files >>> are owned by root:wheel. So if I use scp user@domain.tld:/path/to/*.bz2, >>> it does not have sufficient permissions to fetch the files. I can use sudo, >>> but then I need to interactively type the password, which I would like to >>> avoid. >>> >>> Can you suggest simple ways of getting around this? I don't mind using >>> special tools for the job, especially if they are not too complicated... :) >>> >>> Before firing this email off I took a look at rsync and it seems easy >>> enough to do just what I need but still many thanks for suggestions! >>> >> >> I have been very happy with rsnapshot. Take that for a spin and see how >> it works for you >> > > I have taken a look at rsnapshot but it seems I am left to deal with the > same problem: > > From their page: > In addition to full paths on the local filesystem, you can also backup > remote systems using rsync over ssh. If you have ssh installed and enabled > (via the cmd_ssh parameter), you can specify a path like: > > backup root@example.com:/etc/ example.com/ > > This behaves fundamentally the same way, but you must take a few extra > things into account. > > a/ The ssh daemon must be running on example.com > b/ You must have access to the account you specify the remote machine, in > this case the root user on example.com. > > I do not allow remote root login so what are my options in that case? How > do you deal with such a scenario? Many thanks! HI ZS, I used to do something like this with a very simple shell script, using ftp. In the script, I was simply checking the filename, extracting the date from it, comparing the date with today's date, and pushing into a nother server all files that are dated yesterday. These were log files created using another script, which would create them like main.YYYYMMDD.log. IIRC, ftp relies on a file ~/.netrc which can have the destination hostname, username and password. With these, ftp will be automated - no need to enter any logon credentials. Please read the man page for ftp on how to use the netrc file or the ~/.netrc If you need more assistance, find me off list:-) Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "Oh My God! They killed init! You Bastards!" --from a /. post