[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Backing up files and database better in Ant or Ruby?

vike84

6/16/2005 9:46:00 PM

I am looking to write some basic scripts to back-up various files and
databases as well as restore them. Do you think this would be easier
and better to do using Ant or Ruby?

I would appreciate any insight available.

Thanks!

6 Answers

Austin Ziegler

6/16/2005 9:59:00 PM

0

On 6/16/05, vike84 <mhust6@gmail.com> wrote:
> I am looking to write some basic scripts to back-up various files and
> databases as well as restore them. Do you think this would be easier
> and better to do using Ant or Ruby?
>
> I would appreciate any insight available.

Probably Ruby. Less angle-brackets.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Eric Hodel

6/16/2005 10:02:00 PM

0

On 16 Jun 2005, at 14:50, vike84 wrote:

> I am looking to write some basic scripts to back-up various files and
> databases as well as restore them. Do you think this would be easier
> and better to do using Ant or Ruby?

Where do you want to back them up to?

> I would appreciate any insight available.

I use sh heavily for doing backups, for example, I have scripts run
via cron to make mysql and svn repo backups, and a separate job to
expire old backups (via find -delete). Then I back the whole thing
up with amanda, which uses plain 'ol dump.

Doing that in ruby/ant would involve too much extra typing (for me).

rsync can also be very helpful, I use that to make remote copies of
amanda's disk 'tapes'.

--
Eric Hodel - drbrain@segment7.net - http://se...
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04



Joel VanderWerf

6/16/2005 10:02:00 PM

0

vike84 wrote:
> I am looking to write some basic scripts to back-up various files and
> databases as well as restore them. Do you think this would be easier
> and better to do using Ant or Ruby?

What about rsync (maybe driven by a ruby script)?


Ryan Leavengood

6/16/2005 10:10:00 PM

0

vike84 said:
> I am looking to write some basic scripts to back-up various files and
> databases as well as restore them. Do you think this would be easier
> and better to do using Ant or Ruby?

I'm about to give myself a web presence as well as do some Rails
development, and I'm curious about this as well. I personally wouldn't use
Ant, but I'd like to hear what the overall consensus is on doing backups,
i.e. what software to use, where to backup to, what schedule etc. I'll do
some searching online as well, but it would be nice if there was a
standard "Ruby" way of doing this, particularly when dealing with Rails
projects.

Maybe an elegant, super easy to use Ruby backup library/system would be a
nice project for someone.

Ryan



Joel VanderWerf

6/16/2005 11:00:00 PM

0

Ryan Leavengood wrote:
> Maybe an elegant, super easy to use Ruby backup library/system would be a
> nice project for someone.

Hm, a ruby binding to rsync (or similar functionality implemented in
pure ruby) would be nice...


james_b

6/16/2005 11:56:00 PM

0

Ryan Leavengood wrote:
> vike84 said:
>
>>I am looking to write some basic scripts to back-up various files and
>>databases as well as restore them. Do you think this would be easier
>>and better to do using Ant or Ruby?
>
>
> I'm about to give myself a web presence as well as do some Rails
> development, and I'm curious about this as well. I personally wouldn't use
> Ant, but I'd like to hear what the overall consensus is on doing backups,
> i.e. what software to use, where to backup to, what schedule etc. I'll do
> some searching online as well, but it would be nice if there was a
> standard "Ruby" way of doing this, particularly when dealing with Rails
> projects.

Rule #1 is to keep anything remotely important in CVS (or SVN, etc.)
Rule #2 is to backup CVSROOT, if nothing else.

I tend to use rsync and xxcopy.

>
> Maybe an elegant, super easy to use Ruby backup library/system would be a
> nice project for someone.

There are numerous articles on the Web about doing this, and they are
all fairly simple. It might be handy, though, to have a Ruby wrapper
around certain tools (cpio or tar or rsync) so that they take blocks
using parameters that look more like plain English (or whatever one
speaks besides Ruby).

But generally one need only understand enough to get a proper script,
then run it.


James

--

http://www.ru... - The Ruby Documentation Site
http://www.r... - News, Articles, and Listings for Ruby & XML
http://www.rub... - The Ruby Store for Ruby Stuff
http://www.jame... - Playing with Better Toys