Wel Come

Showing posts with label Backup Restore. Show all posts
Showing posts with label Backup Restore. Show all posts

Tuesday, February 1, 2011

Is Laptop Hard Drive Recovery Possible?

These days’ laptops are being used because of its portability, which is not possible with the PC. A laptop computer enables people or a business professional to carry his office with him, and enables him to work and also stay in business also whenever he isn’t at home or in his or her work place. Thus, it is obvious that a laptop would generally be stored with vital business and official data. But, it’d be rather frustrating just in case your significant data is lost associated with the laptop and at the same time you don’t have a back up of the significant data files.

There may be many reasons of data loss in laptop computers. Some of them are accidental deletion, human error, virus act, corruption and many other problems may lead to loss of valuable data from your laptop.

The worst thing that can occur to most laptop computer users, apart from the loss of the whole laptop computer, is disk drive failure. The disk drive keeps your entire information, data files, and all your emails and contacts when you utilize Outlook, or any other information. To put it briefly, any wrong motility may often damage the laptop computer and in addition information held in it, and therefore is certainly treated with utmost caution.

When you erase the information, that component of your hard disk, where your information was stored gets totally free to store some new information, but the pattern proceeds to persist, until it is recycled. Indeed let’s come down to the three golden rules you ought to pursue, after you realize that you still have lost information.

A laptop computer hard drive information retrieval could be proficient adequate to regain information from a lot of the types of laptop computer hard drives for instance parallel ATA (PATA), Serial ATA (SATA), SCSI (SCSI), and Solid State Drives (SSD). As well as in house service, some companies even interpret onsite laptop computer hard drive information retrieval services nevertheless much like the reason for information loss. There are similar companies that interpret professional messenger and pick up services.

A leading laptop hard drive recovery is provided by many softwares that are available in the market. It is one of the quick, trustworthy, and straightforward ways to rescue your lost data from your laptop. They also provide services that assist you to restore lost data which is lost as a result of several reasons, from logical and physical damages to natural disasters such as earthquake, flood, and cyclone.


Join Orkut

Thursday, January 27, 2011

Backup MBR in Linux

MBR is short for Master Boot Record. It is a very small program which is located in your hard disk and executes when a computer boots up, before the operating system. Typically, it is at the first sector on your hard disk and the size is 512 bytes. The MBR maintains the DPT (Disk Partition Table), which can contains 4 primary partitions, and start the operating system. If the MBR is damaged, your operating system wouldn't be able to boot up.
Why should you backup the MBR?

Since the MBR records some information about your hard disk partitions and it loads the operating system, it is very important for a computer. Some virus can damage the MBR. They can modify the MBR so that they can start before the operating system. Or it makes your computer not to be able to run. Reinstall the operating system can solve this problem but it takes too long time. In fact, if you backup the MBR, the solution is very easy: just restore it.
How to backup MBR in Linux?

Linux or Unix provides "dd" tool to backup any file. Usually, you must be "root" so that you can use it. Before you try it, you must know it is a dangerous command, any mistake may damage your hard disk. BE CAREFUL! To backup the MBR, open the terminal and execute the following command:

dd if=/dev/sda of=~/mbr.img bs=512 count=1

Here, I suppose your hard disk is /dev/sda. It means that copy 1 block (count=1) from /dev/sda (if=/dev/sda) to ~/mbr.img (of=~/mbr.img) and the block size is 512 bytes (bs=512). After that, you can see "mbr.img" in your home directory. Its content is MBR.

Notes: Since the MBR doesn't belong to any partition, you should use if=/dev/sda, or /dev/sdb, /dev/hda, etc, instead of /dev/sda1, /dev/sdb1... You must pay attention to the "of" and "if" arguments. For example, if you type this:

dd of=/dev/sda if=~/yourfile bs=512 count=1 (DON'T try it!)

It means reading 512 bytes of ~/yourfile and writing it to /dev/sda. If ~/yourfile is a normal file instead of MBR, your MBR will be damaged. In fact, it will covers the MBR with ~/yourfile. You will find the operating system can't start next time.
How to restore MBR in Linux?

Since if the MBR is damaged, the operating system can't boot up. You need a Linux live CD to start your computer. Linux live CD is a CD that contains Linux operating system. It doesn't need to be installed on your hard disk an can be run from CDROM directly. For example, Puppy Linux. I strongly advise you to make a live CD in advance. To boot from a live CD, insert the CD into your CDROM and make sure the first boot device is the CDROM (you can change the order of boot devices in BIOS). Then restart the computer. After a while, you will enter Linux environment. For example, if the MBR image file (mbr.img) was at /home/admin/mbr.img and /dev/sda5 was mounted as /home. You should mount /dev/sda5 at first.

Step 1. Open terminal and execute the following command to make a directory:

mkdir tmp

Step 2. Mount /dev/sda5 to the "tmp" directory:

mount /dev/sda5 tmp

Step 3. Change the current directory to tmp/admin:

cd tmp/admin

Step 4. Restore the MBR:

dd of=/dev/sda if=mbr.img bs=512 count=1

After that you can reject the live CD and restart your computer. If there are not other problems, your computer will work again.


Joinn Orkut

Backup Your Files with 'tar' in Linux

The easiest way to back up your files is just copying. But if you have too many files to backup, copying and restoring may take too long time and it is not convenient. If there is a tool that can put many files into one file, the world will be better. Fortunately, 'tar' is used to create archive files. It can pack files or directories into a 'tar' file. It is like WinZip in Windows, but without compression.
How to create an archive file?

The most simple way to create an archive file with 'tar' is: tar -cf foo.tar file1 file2 ... Here, foo.tar is the name of the tar file you want and file1, file2... are the files you want to back up. The argument 'c' means 'create' and 'f' means 'filename'. After that, tar will generate foo.tar which contains file1, file2....

By the way, the suffix '.tar' is not necessary, it is just a good habit. Although you can specify the files you want to backup, the more usual usage of 'tar' is packing a directory, including its sub-directories and files: tar -cf foo.tar directory_name. So put your files into a directory before using tar is a good habit.

If you have installed gzip and bzip2 (almost all Unix/Linux include them), tar can call them directly to compress. i.e. create a '.tar.gz' or '.tar.bz2' file. The argument 'z' stands for 'gzip': tar -czf foo.tar.gz directory_name and 'j' means 'bzip2': tar -cjf foo.tar.bz2 directory_name. Since compression is a hard task for CPU, this will take more time. But it can save much disk space indeed.
Restoring

Restoring means extracting files from a tar file. To extract files into the current directory from a normal tar file (without compression), just use 'x' argument. For example: tar -xf foo.tar. If you want to extract to another directory, you need '-C' (uppercase) argument. For example, tar -xf foo.tar -C /opt/foo will put the files into /opt/foo directory (make sure you have enough permission to write /opt/foo).

If the tar file is compressed, you need know its format, gzip or bzip2. Usually you can know it through the file's suffix. To extract from '.tar.gz' file, use 'z' argument and to extract from '.tar.bz2', use 'j'. 'tar' will call gunzip or bunzip2 automatically.

tar -zxf foo.tar.gz
tar -jxf foo.tar.bz2
How to view a tar file?

For some reasons, you want to know what a tar file includes but you don't want to extract files from it. What you need is 't' argument. It will list the files and directories that a tar file contains:

tar -tzf foo.tar.gz
Some tricks

If the files you want to backup is too large or too many, it may take very long time. You can add '&' to make tar run in the background, so you can continue to do other work.

tar -czf foo.tar.gz foo &

If you like to print the file that tar is processing currently, you can use 'v' argument:

tar -xzvf foo.tar.gz

It will show a list of files on the screen.

Join Orkut

How to Backup Your Files Automatically (for Linux users)

In the two previous articles I introduced two common used utilities in Linux operating system, tar and cron. "tar" is used for creating archive files and "cron" is a time-based scheduling utility. In this article, I will combine "tar" with "cron" to solve the problem: how to backup your files automatically?

Some people think that "backing up" is a boring work. I agree with them. But when an accidence happens, the backup files is very important. So for lazy users, it would be better to let the computer do the boring work.

Have you remembered how to use "tar" to create an archive file?

Tips: tar -cf ... or tar -czf ... to create a compressed archive file.

The task is: Dobby (a Linux user) is a writer and all his documents are located in /home/dobby/documents. He wants to backup his documents to /mnt/disk2 every day. And the backup files' name should be "document_MM-DD-YYYY.tar.gz".

For example, if a backup file's name is "document_08_31_2008.tar.gz", that means it was created in August 31st, 2008.

However, the second problem is that it will generate lots of files. So he wants to delete the old backup files automatically.

Let's solve the problem step by step.

Step 1. You should get the current date. You can use "date" command to do it. The command is:

date '+%m-%d-%Y'

You can test it in the terminal window. The result may be "08-31-2008". Here '+%m-%d-%Y' is a format string. A format string's first character must be '+'. '%m' means the month in two-digits format, '%d' and '%Y' means 'date of month' and 'year' respectively.

Step 2. Combine "date" with "tar". Lets create an archive file using "date" and "tar". "date" is used for getting the current date, which is a part of the archive file name.

tar czf /mnt/disk2/documents_`date '+%m-%d-%Y'`.tar.gz /home/dobby/documents

You see that I put the "date" command into a pair of backslashes '`' which means using its result to replace itself. In this way we can construct the archive file name.

Step 3. Edit /etc/crontab to let "cron" execute the command on time. Use your favorite text editor to open /etc/crontab. Add this line:

0 15 * * * root tar czf /mnt/disk2/documents_`date '+%m-%d-%Y'`.tar.gz /home/dobby/documents

Save it and quit. "cron" will execute this command as root account at 15:00 every day. If you want "cron" to read its configure file immediately, you should restart cron:

/etc/init.d/cron restart (be sure you have enough permissions)

Otherwise, cron will know this task after you reboot the computer.

Step 4. Solve "how to delete old files automatically". To delete the old files, first you should know which files is old, and what the "old" means. For example, if a file was created in one week ago, we think it's "old". You can use "find" to find the old archive files and delete them.

find /mnt/disk2 -name 'document_*.tar.gz' -mtime -7 -delete

It means finding the files whose names match the pattern 'document_*.tar.gz' in /mnt/disk2 directory and they were last modified 7 days ago. Then delete them.

Now add the command to /etc/crontab, let "cron" execute this command at 15:30 everyday:

30 15 * * * root find /mnt/disk2 -name 'document_*.tar.gz' -mtime -7 -delete

All things done. From now on, I think Dobby won't hate "backing up" any more.


Join Orkut

Backing Up Files with "rsync" (for Linux users)

* Home
* Backup How-To's
* Backup software
* Online backup
* Others
* Forum
* Contact
* About
* Recent posts

Home
Backing Up Files with "rsync" (for Linux users)
By Wang Jinbo - Posted on September 15th, 2008
Tagged:

* Backup How-tos
* linux
* rsync

"rsync" is a simple but powerful backup utility in Linux. Although the traditional archive tool "tar" can make a backup, "rsync" supports more functions, for example, saving the backup on a remote machine. For incremental backups, rsync provides a better method than "tar".
How to Use "rsync"

The basic usage is:

rsync -a src/ dest/

This command will copy all the files and directories in the "src" to the "dest" directory. In fact, it is equivalent to "cp -a src/ dest/". But if there has been many files in "dest" and there are only a few differences between "src" and "dest". "rsync" runs much faster. It makes "rsync" more suitable for creating incremental backups.

Notice: For most of software, the trailing slash after a directory name isn't important, but it is not for rsync. Let's see two example (suppose there is a file "foo" in the "src" directory):

rsync -a src dest

This will produce dest/src/foo. However, if I add the slash after the directories:

rsync -a src/ dest/

This will produce dest/foo. As you see, rsync doesn't care of the trailing slash after the destination directory. But it is different between "src" and "src/". So you must know about it.
Option: --delete

"rsync" can make a completely same backup from the source directory. However, if I used "rsync" before and just now I deleted a file from the source directory, "rsync -a src/ dest/" won't delete the file from the destination (backup) directory. The option "--delete" can solve the problem. For example:

rsync -a --delete src/ dest/

It will check all the files and directores in "dest" and if rsync finds a file or a directory in the "dest" which is not it the "src" directory, rsync will delete it. In this way, rsync keeps the "src" and the "dest" completely same.
Use "cron" to execute rsync on time

"cron" is a time-based utility for executing some commands automatically. It can run some programmes at a specific time. If you are lazy enough, you can add "rsync" into the cron configure file: /etc/crontab.

Use a text editor to open /etc/crontab and add the following line into it:

20 4 * * * root rsync -a --delete src/ dest/

When the time is 04:20, cron will run "rsync -a --delete src/ dest/" to make a backup and delete the unused files. By the way, "cron" is a very useful utility in Linux/Unix operating system. If you want to learn more, you can read its manual page.


Join Orkut

Linux Backup: Hard Disk Clone with "dd"

Most of Windows users may know "Norton Ghost". Norton Ghost is a backup software for hard disks. It can backup a whole hard disk or a partition to an image file. Also, Norton Ghost can copy all the contents from a hard disk to another exactly. However, Norton Ghost is a Windows software, users on other operating system (such as Linux) can not enjoy its powerful function. Fortunately, most of Unix/Linux operating system provides a command line whose function is similar to Norton Ghost, it is called "dd".

In fact, "dd" is much powerful than Norton Ghost. You can use many arguments to control it. In this short article, we only concern on how to backup a whole hard disk or a partition.

Hard Disk Clone

Suppose you have a 40GB hard disk and a removable hard disk whose capacity is 60GB, and you want to backup all the files from the hard disk to the removable disk. With "dd", it is a very easy task. Again, suppose your hard disk's Unix device name is /dev/sda and the removable disk is /dev/sdb. The following command can copy all the content from /dev/sda to /dev/sdb:

dd if=/dev/sda of=/dev/sdb

Here, if=... sets the source and of=... sets the destination. "dd" doesn't care of the contents of the hard disk. It just reads bytes from /dev/sda and writes them into /dev/sdb. It doesn't know what are files. So, the hard disk file system and how many partitions it has are not important. For example, if /dev/sda is splitted into three partitions, the /dev/sdb will have the same partitions. i.e. "destination" is completely same with "source".

Notice: to execute "dd" you should login as "root" or switch to "root" using "su" command. And you must be careful, a small mistake may cause a serious problem!
Making a Hard Disk Image File

Most of time you don't want to make a complete duplication of your hard disk. You may prefer to creating an image file of the hard disk and save it in other storage devices. The following command will create an image file "disk1.img" in your user's directory from /dev/sda:

dd if=/dev/sda of=~/disk1.img

Since you have created an image file, you can compress it with "gzip" or "bzip2":

gzip disk1.img #generates disk1.img.gz or

bzip2 disk1.img #generates disk1.img.bz2

You can save much storage space with compression. But it will take very long time.
Partition Clone

Backing up a hard disk partition is much similar to backing up a whole hard disk. The reason is that Unix/Linux uses device name, such as /dev/sda1, /dev/sda5... to indicate the partitions. For example, if you want to create an image file from the first partition of /dev/sda, use "dd" like this:

dd if=/dev/sda1 of=~/disk2.img

Also, you can compress the image file:

gzip disk2.img

By the way, you can copy a partition to another partition completely, just set "of" to the partition's device name. For example:

dd if=/dev/sda1 of=/dev/sdb5

This command will copy all the contents from /dev/sda1 to /dev/sdb5. You must be sure that the capacity of /dev/sdb5 is larger than /dev/sda1.
Restoring from an Image File

To restore a partition or a hard disk from an image file, just exchange the arguments "if" and "of". For example, restore the whole hard disk from the image file "disk1.img":

dd if=disk1.img of=/dev/sda

Restore the first partition of /dev/sda from the image file "disk2.img":

dd if=disk2.img of=/dev/sda1

join Orkut

How to backup registry in Windows 7?

Why you should backup registry? Every time you install a new application or game to your computer you risk. You risk the incompatibility with the current registry keys made by other applications. The same applies for running some cleaning software. Since the registry backup is very easy in Windows 7, you are a step away from keeping your system in a good condition.

Of course, the registry backup is not helpful itself. You should remember to backing up your data, creating a whole backup of the disc and keep it on safe place. However the registry backup could be useful because:

* it is very easy
* it is very fast
* prevents your system from crash after using some “cleaners”
* prevents your system from crash after (un)installing an application

I would like to highlight the two latest items from the list above, especially using the cleaning applications. The cleaners scan the registry database and remove some items. They think these items are not useful or needed yet. However the cleaning software could be wrong. I saw hundreds computers which lost their stability because the cleaning software removes needed registry entries.

You can use cleaning software, it is no problem. But don’t forget, that you should create a registry backup before running them. No matter if you are using the newest Windows 7 or the Windows Vista/XP.

I expect you are running the Windows 7. However the registry backup is very similar in other Windows versions. So how you could create registry backup in Windows 7?
Registry backup in Windows 7

Close your running applications and go with me:

1. Click the Start button and open the menu.
2. Start typing the regedit. The Windows 7 should find the application, so click the shortcut to run it.
3. Alternatively you can hit Win+R keys, type the regedit word and hit the Enter key. This will result to run the Registry Editor too.
4. The Registry Editor in Windows 7 shows some branches you can expand and collapse. To back up the whole registry database you will work with the root item – Computer.
5. Right click the Computer item and select the Export function from the context menu.
6. The saving dialog will appear. Select the folder and type the name of the backup.
7. Make sure you have the All option selected and then click the Save button.
8. Voila, your Windows 7 registry database is backed up.


Now you can run the cleaners without any worries. After they are done with their job, reboot the Windows 7 and check the functionality of your applications and the system itself. If anything will go wrong, just double click the saved backup. Windows 7 will ask you to confirm the registry import. Do it, reboot the computer and you will have all your registry entries back.