Backing up settings in Linux/Ubuntu

Deja Dup Backup tool

Deja Dup Ubuntu's official backup Program

Deja Dup Ubuntu’s official backup Program

Ubuntu provides an efficient backup tool called “Deja Dup Backup tool” which can backup entire home directory. Deja Dup can be scheduled to run automatically as well. It is a front end of Duplicity. Other distros also provide or one can always install some program for scheduled BackUps. But there are various reasons when we may not want whole directory to be backed up or do not have time or resources to run ‘Backup’. There may also be a situation that we may not want to restore everything but be selective. In other words what if we want to restore settings of only a few programs. For example autotext and other settings of Open Office.
Solution to all these problems is Manual Back up or copying the settings in a compressed (or uncompressed) folder.
I personally find that these automatic backups as these are useful only if whole hard disk crashes with absolute no chance of even partial recovery. But real situation is always more complicated even if less worse.

Backing up settings of individual program

The settings of individual programs are saved in hidden folders in home directory. For example my user name is ‘sand’ and I want to find settings of Mozilla. Open ‘/home’ click ‘sand’ now either press “Control+H” in nautilus or select ‘Show hidden files’ from View manu. It will show numerous folders with names starting from .(Dot). Find .mozilla and copy it to the folder of our choice for future.

Selective Back up is particularly useful in case of change of Distro. For example if we are using Ubuntu and decide to change to Mint, even if the latter is a derivative, it may not work properly with old /home directory structure. It is better to back up entire directory or some of the third-party program folders separately and replace them one by one, as may be required, from time to time and leaving out the system/Distro folders altogether.

Backup all settings of all programs

We may select all folders in /home directory, beginning with dot and copy for safe backup. Alternatively select all dot folders and right click the mouse and choose ‘compress files’ follow directions and save in compressed file/archive. We can extract one or more folders as per requirement. One caution. The archive manager may give error warning if there is a hard link within any folder and that folder may not decompress later.
Some programs which save some or all of its settings elsewhere, would be excluded.

Other tools for backing up

Rsync is a powerful command line utility to back up or sync the large folders or even entire drive. There are two excellent GUI options available in Ubuntu Software Center. These are:

1. File Backup Manager (based on rdiff-backup)

File Backup Manager

File Backup Manager

2. Lucky Backup (based on rsync)

With the help of above a selective backup of /home can be obtained at any time.

© Sandeep Bhalla

Advertisements

Hard disk

Western Digital

While the prices of hard disks have gone up by nearly 100% i.e. double in past six months the quality has nose-dived. I have already replaced three of Western Digital make within a period of a year.

Hitachi

An external Hard disk (model X-320) of Hitachi also broke down in about a year and I had to send for its replacement but the worst part is that the replacement sent to me was also broken and I had to send it again on the same day in same packing for replacement. Never buy a HITACHI disk. Today I received the replacement. It did not work on desktop but worked on Laptop. Let’s hope it will work.

Added on 17 Nov. 2012:

Never buy Western Digital

Its Hard disk are of very poor quality. I had purchased three hard disks in past few years, two have been replaced once. One hard disk was replaced about four-month ago was again having reading errors. It has to be replaced again. I wonder what is the problem. I had always believed that Western Digital being technically innovative must also be durable, proved to be a myth. Never ever buy a Western Digital Disk.

© Sandeep Bhalla

Creating RAID 1 Array backup

Creating raid in Ubuntu Precise PangolinSoftware RAID is a good alternative to hardware raid. Disk Utility bundled with Ubuntu has a feature to create software RAID. We need to have an additional disk with similar or larger capacity.

  1. In Ubuntu/Mint type disk and choose ‘Disk Utility.’
  2. Go to File->Create->Raid Array.
  3. Pick hard drives that have free, non-partitioned space.
  4. Choose raid array size and click create.
  5. If we get an error we need to install mdadm. Even otherwise we may prefer to install mdadm to manage the Array. The name is derived from the md (multiple device) device nodes it administers or manages. It replaced a previous utility mdctl. The original name was “Mirror Disk”. It was changed as the functionality increased. It is a free software under GPL.

mdadm can be installed from Ubuntu Software Center or from command line. Open terminal (ctrl+shift+t)  and type:

sudo apt-get install mdadm

enter password. choose yes and it is done.

For additional help on an alternative/manual method check this url: http://www.pwrusr.com/system-administration/add-raid-1-on-your-running-ubuntu-pt2-hands-on

© Sandeep Bhalla