convertxtodvd_logo

ConvertXtoDVD

VSO ConvertXtoDVD is considered to be one of the best Video converters. It combines high speeds, high quality and many options for your personalized DVD menus.

ConvertXtoDVD guide
Free Download ConvertXtoDVD

Linux Books

Of course the Internet along with the help of Google is a great source of information. You can answer almost any question you have about Linux and find many tutorials, guides and help. However many people prefer reading this information on a printed book accesssible even when they are not online or don't have a computer in front of them. I've received many e-mails asking me to propose them a few good books regarding Linux commands, administration and for specific distributions such as Ubuntu, Fedora etc. So, I've search for a few good books. Here they are. Happy reading!

Linux Books

Ubuntu guides

Ubuntu is a free Operating System based on Debian GNU/Linux. It has been rated as the most popular Linux distribution amongst Linux users according to Distrowatch. As it happens every six months a new version of Ubuntu has been released. Ubuntu 10.04 Lucid Lynx is here! Below you can find some helpful tutorials for old and new users!

Ubuntu 10.04 Lucid Lynx Post Installation Guide
Ubuntu 9.10 Karmic Koala Post Installation Guide
Ubuntu 9.04 Jaunty Jackalope Post Installation Guide
How to install Ubuntu Linux on Windows using VirtualBox

Fedora 12 Installation Guide

Fedora 12, codenamed Constantine, is released! Just for the info, Fedora is an RPM based Linux Distribution, an Operating system in other words, developed by the community supported Fedora Project and sponsored by Red Hat. Fedora contains only free and Open Source software. Some of Fedora's 12 new features are Gnome 2.28, KDE 4.3, better web cam support!, and many others.

Fedora 12 Installation and Post-Installation Guide
Fedora 11 Installation and Post-Installation Guide
Fedora 11 Installation and Post-Installation Guide in Chinese

Backups are very important if you don't want to lose your data in case of a hard disk failure or generally if something goes wrong. Therefore it is a good idea to keep a copy of your data in another computer just to be sure. In some other cases you just want to keep the data you have in two places syncronized. However it is boring each time to select all the files and copy them to the new location. In this guide I will show how to use rsync to automate this process.

First of all you have to install rsync. This is easy if you use your distribution's package management system.

Now let's say that you want to synchronize a directory and its subdirectories from your computer to another computer in your LAN. To do so you first have to mount the remote hard disk. I have described how to do this easilly using smb4k here . For this guide I will use /home/axel/ as the source directory and  /home/axel/smb4k/CORE2DUO/Core2Duo(E)/backup/ as the destination directory. CORE2DUO is the name of the second computer and Core2Duo(E) is the hard disk I want to copy the files to. backup is the directory where all the files will be copied. The remote disk here is mounted under my home directory. As you can understand there is no difference if the remote computer has Linux or Windows instaled. Of course the procedure is the same if both directories are in the same computer.

So, open a terminal and type:


rsync -r -t -v --progress --delete -c -l -z /home/axel/ /home/axel/smb4k/CORE2DUO/Core2Duo(E)/backup/

Don't forget the / at the end of both directories.

This command in generall will synchronize the destination directory with the source one. Let me explain better what each option does.

-r copies also all subdirectories within main directory
-t preserves modification times
-v verbose mode, shows more information
--progress shows progress during transfer
--delete deletes files in destination which are not present in the source
-c compares files contents by checksum
-l copies symbolic links
-z compresses files for faster transfer
/home/axel/ source directory
/home/axel/smb4k/CORE2DUO/Core2Duo(E)/backup/ destination directory

If you want first to test what the result of the command will be you can also use the -n option which executes just a simulation.

If you want to preserve owner, group and permissions of your files you have to use 3 more options.

-o preserves owner
-g preserves group
-p preserves permissions

You can also exluce some subdirectories if you don't want them. To see the complete options list type man rsync.

If you find all those options complicated and you prefer the GUI way you can install grsync. grsync is a Graphical User Interface for rsync. Although it doen't support all of rsync capabilities, such as remote synchronization through ssh, it is pretty good for the job mentioned above. You can probably find it in your distribution's Package Management System as well. If you don't download it from here . This is how it looks like:

grsync.jpg

Next you can automate even more this progress. For example let's say you want to synchronize the above directories every day at noon. First you have to create the script which will be responsible for this job. Open a terminal and type:

nano sync.sh

and copy in there:

#!/bin/sh
rsync -r -t -v --progress --delete -c -l -z /home/axel/ /home/axel/smb4k/CORE2DUO/Core2Duo(E)/backup/

Save (Ctrl+O) and exit (Ctrl+X). Next you have to make this executable and test if it is running properly. (Don't forget the simulation -n option.)

chmod +x sync.sh
./sync.sh

If the result is ok it's time to put it in a cron job. You must have cron installed. Again use your PMS to get it. The default editor from crontab is vi. Therefore if you prefer nano or anything else change it like this:

export EDITOR=nano

Next type:
 
crontab -e

and paste this line:

0 12 * * * /home/axel/sync.sh

This is the structure of the command:

minute hour day_of_the_mont month day_of_the_week command

So in this way you will have a daily backup of your files at noon. As another example if you want to syncronize your files at 12 o'clock every 7 days type:

0 12 * * 7 /home/axel/sync.sh

Don't forget that the cron deamon should be running all the time for this command to be executed. Check if crond is running by typing:

/sbin/service crond status


Add this page to your favorite Social Bookmarking websites

Trackback(0)

TrackBack URI for this entry

Comments (3)

Subscribe to this comment's feed
rsync to a remote machine?
Hello;
Thanks for the info. very useful.
I was wondering how to rsync a remote machine?
Can you explain that please?

Thank You!
Matey , June 23, 2009
...
Thank you Matey!

To rsync a remote machine you must have an ssh daemon running on the remote machine. Then the command would be something like this

rsync -avz -e ssh remoteuser@remotehost:/remote/dir /local/dir/
axel , June 25, 2009
Auto Backup
Dear sir,
I have So in this way you will have a daily backup of your files at noon.Networking Linux Server As another example if you want to syncronize your files at 18 o'clock every 7 days type:
Bharat singh , July 21, 2010

Write comment

smaller | bigger
security image
Write the displayed characters

busy

Login Form

Follow me on...

  • Digg: axelgr
  • Facebook Page: 379363054400
  • FeedBurner: my-guidesnet
  • Twitter: myguidesnet
  • External Link: http://feedburner.google.com/fb/a/mailverify?uri=my-guidesnet

Member Login