Thursday, June 5, 2008

Backing Up Data In Ubuntu Using sBackup











Backing Up Data In Ubuntu Using sBackup

Be it Windows, Mac or Linux, it is always a wise choice to backup your data. You never know when your hardware is going to fail and when that happens, you know that all your data is safe and there is a backup copy for you to fall back on.

In Ubuntu, it is surprisingly easy to backup your data. Gone are the days that require you to remember all the text line commands to type in the command prompt. With sBackup, you can easily backup your data with few clicks of your mouse. let me show you how.


First, install sbackup

sudo apt-get install sbackup

Once done, go to System -> Administration -> Simple Backup Config. Enter your login password and you will be able to see the Window shown in the screen below.

sBackup screenshot1

Under the General tab, there are three ways you can choose to backup your data:

  1. Use recommended backup setting
  2. Use custom backup setting
  3. Manual backups only

If you are plain lazy and just to click, save and let it run by itself, you should choose the “recommended backup setting”. This will do a full backup every week and daily incremental backups to any changes made to the files. One point to note, this setting does not backup multimedia files and all file sizes that are more than 100MB.

For anyone who wants more control over which files to backup, the custom backup setting should be used. This setting allows you to define what should be included, excluded, the backup destination, when to backup and what to do with old backups.

Manual backup setting is for those who want to perform the backup manually.

Configuring backup setting

If you are choosing the custom backup or manual backup setting, here are your configuration choices:

The Include tab shows a list of directory that you want to backup. The two main directories you want to include are the /home and /etc. The /home contains all your personal data while the /etc contains all the application you have installed.

sBackup screenshot2

On the Exclude tab, you can do just the opposite, excluding the files that you don’t want to backup. You have more choices here. On the left, there are four tabs – paths, file types, regex and max size. You can exclude all files from a path, all files of a certain files type, all files that match a certain expression or any files that are bigger than a certain size (the file size to be fixed by you). Some of the directories that you might want to exclude are /proc, /var/cache, /tmp, /dev, /var/tmp, /lost+found, /mnt, /media, /sys.

sBackup screenshot3
sBackup screenshot4
sBackup screenshot5
sBackup screenshot6

Next, we proceed on to the Destination tab. This is where you choose the location to backup your data to. The default backup directory is /var/backup. However, you can change it to other directory of your preference. You can also choose to backup to a remote directory via SSH or FTP.

sBackup screenshot7

The next option available to you is the Time setting. You set the time where the backup is executed. It can be hourly, daily, weekly, and monthly or if you prefer, set the precise day of the month, day of the week and even the hour and minute to backup your data. The last option in this setting is to set the minimum number of days before a full backup is required.

sBackup screenshot8

The last tab is the Purging. Select how you want to handle your old and incomplete backups. You can either choose to erase all backups older than your preset number of days, or use a logarithmic setting where one backup from the previous day, week, month and year are kept and the rest removed.

">

Once you are done and satisfied with the configuration, press “Backup Now!” to start the backup. Depending on the setting you made, the process can take from few minutes to few hours.

Restoring the backups

It is very easy to restore the backup. Got to System -> Administration -> Simple Backup Restore. Enter your password and the window (shown in the screen below) will pop up.

sBackup screenshot10

Choose the backup directory where you backup your file and select the files or folders that you want to restore. To restore to the same location, press Restore. To restore to other location, press Restore As.

That’s it!

Friday, February 15, 2008

Webrick 'require_frameworks' message

If you have any error like this.......

ruby script/server
=> Booting WEBrick...
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:159:in
`require_frameworks': no such file to load -- openssl (RuntimeError)
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:88:in
`process'
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
from /home/kenny/KensLib/myrails/Dec28/config/environment.rb:13
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in
`require'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in
`new_constants_in'
... 7 levels...
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from script/server:3
--

Just Copy the below code & paste in your terminal

sudo apt-get install libopenssl-ruby

It will install lib file for openssl-ruby

Saturday, February 2, 2008

How to convert WMA files into MP3 using RUBY

How to convert wma files into mp3

Download your wma files from site. (eg. http://www.123musiq.com -- old songs)

Then

Open ur terminal & install the following

$sudo apt-get install mplayer lame

$sudo gem install r2mp3

Then Copy ur wma file into ur home folder(eg: /home/user1)

eg: mv /home/user1/desktop/*.wma /home/user1

Go to ur home folder cd /home/user1

Then change ur wma file name into some simple name (Optional)

eg: cp file_name -123musiq.com.wma file_name.wma

Then Open ur irb and

Start Coding

require
'rubygems' # if install using gem
require
'r2mp3'
Converter.new(:convert=>:wma,:file=>"test.wma"){|f| f.to_mp3}

Here u have to mention file=>"path/file_name.wma"

After this check ur home folder u will find file_name.mp3