My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

09/07/2007 by Krzysztof G.

TODO List:

  • Add list of all the files inside the backup directory, which will be easily
  • searchable, list in the form of text file will be included in root of the
    backup directory.
  • Add script to automate the whole process (including burning the CD/DVD) using
  • anacron/cron functionality.
  • Add notification capability which informs the user of scanning performed and
  • alerts when the backup exceeds preferred value in MB.
Possibly more to come...

09/07/2007 by Krzysztof G.

Simple backup utility written in Ruby programming language! This project consists of just a small bunch of scripts, mainly to deal with XML configuration files.

Features:
  • As you are probably aware at this point, this is a console based application
  • Gathers files from many locations
  • Keeps track of the data and copy only new files or the ones with different timestamps
  • Keeps track of the previous backups to prevent storing the same files on different CD's
  • Is configurable with simple wizard
  • Has logging facility
  • Checks the size of the backup folder and notify the user when it exceeds preferred size
  • Checks the size of the file before adding it to the backup folder to see if it fits

More or less that's all. Well, there are a few things someone who wants to try it should know. First, there is not much validation in place so please enter the data as specified in the examples when running the configuration utility. Second, the source is not commented in a very sophisticated way, but I think everyone who wants to tweak it a bit will find out what is where. The utility has no name yet, so feel free to send me some if you find this tool useful at all. The whole application consists of two main scripts, one for running configuration program and the other for running actual backup.

Installation:

This utility was written for Linux and for Linux only! Tested on Ubuntu 7.04. You would have to have ruby installed, check www.ruby-lang.org for download and installation instructions. For the application itself just download the tar.gz folder from the link below, unpack it, and you're ready to go!

Setup:

Simply run backupConfig.rb file (you can make it executable with chmod or run ruby filename.rb) and follow the rabbit.

Run:

Run bckp.rb similarly to backupConfig.rb, if you have ruby in place just make sure you have an -x flag set on this file or run ruby bckp.rb and you are ready to go. Before running bckp you have to run config utility to have all the settings in place.

If anyone will find it interesting, wants to learn some Ruby and would like to extend its functionality let me know and I put the files somewhere in cvs or subversion server. Possible enhancements include:

  • GUI with GTK2 or some other Linux aware toolkit
  • some kind of notification facilities
  • launching external CD/DVD burner or similar functionality

If someone has some more ideas please feel free and let me know.

This script was written on Netbeans 6.0 M9 development version with Ruby support.

Download:

# Non-members may check out a read-only working copy anonymously over HTTP. svn checkout http://bckp.googlecode.com/svn/trunk/ bckp

For NetBeans check out, you can follow my tutorial posted earlier on this blog!

This is my first program in Ruby which is more complicated than famous 'hello world' so don't expect anything astonishing.

Powered by Google Project Hosting