Posts tagged as:

Howto

In this post, I would like to introduce the easiest way to backup and restore the Ubuntu system from my experiences.For more information about backup and restore you can see this post

I am usually doing crazy with my system so it is really necessary to backup the system file before dong such things :)

Backup

The basic idea is using Tar command. I recommend to backup your system and your personal data separately to avoid the very big backup files and the system file is more important than anything else.

The basic command is:

sudo tar cvpjf backup.tar.bz2  --exclude=/sys  /

We should exclude some directories because of some reasons:

  1. I usually mount other partions under /media directory, but someone they usually mount under /mnt directory. So we should exclude /media and /mn.
  2. Folder: /var/cache/apt/archives we should remove from backup file because it stores the cache apt files, we don’t need to make the backup file smaller. After several days, if you forget to delete those files, your backup file will get bigger.
  3. Folder: /home we should exclude because we will store the personal data separately.
  4. Foder /tmp we can exclude because it stores the temp files only.
  5. Of course, the backup file before: backup.tar.bz2

Finally, we get the backup commands are: ( I include all necessary commands also)

cd /
sudo tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found \
--exclude=/backup.tar.bz2 --exclude=/var/cache/apt/archives \
--exclude=/mnt --exclude=/media --exclude=/home --exclude=/tmp  --exclude=/sys /

So just copy those commands and paste on your terminal by using the hotkey: Ctr + Alt + V

For backuping your home data, you can do the same way without or with exclude some directories like:

- Browse to the user directory, let’s assume /home/ngohaibac

cd /home/ngohaibac

- Backup by using tar command and exclude some folders I don’t want to backup

sudo tar cvpjf backup_home.tar.bz2  --exclude=~/store  --exclude=~/backup_home.tar.bz2  .

Store

To get backme the system at the backup time, I recommend you a good way to do:

Step 1

Boot your system using Live Ubuntu CD and delete all directories: /usr, /var, /etc, /bin in the Ubuntu partion. You can use the command like: sudo rm -fr /media/ubuntu_mout_point/usr

Step 2

Restore all files by using tar command:

- Browse to that partion: let’s assume /media/disk

cd /media/disk

- Restore all data:

sudo tar xvpfj backup.tar.bz2 -C  .

Wait for a moment, and reboot your system, now you can get your system again.

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)

How to install Picasa in Ubuntu

May 31, 2009

Homepage: http://picasa.google.com Today, I am going to upload my pictures from last party, I suddenly remember a such powerful and great image management: Picasa from Google. Actually, I love Google products because of their simple characteristics. Picasa application can run cross-platform on Linux and Windows OS as well. In Windows, it use this one also. [...]

Read the full article →

Make Money Online With John Chow dot Com

May 24, 2009

Homepage: http://www.johnchow.com/ with the title: I make money online by telling people how. I am a beginner in making money online, but I still try my best. I think that the tips and tricks in his book is really a  great reference.  Making money online doesn’t mean you can do it easily by writing some [...]

Read the full article →

How to learn Matlab programming effectively

May 23, 2009

What is Matlab ? MATLAB® is a high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numeric computation. Using the MATLAB product, you can solve technical computing problems faster than with traditional programming languages, such as C, C++, and Fortran. More information In my major: automatic control, we use [...]

Read the full article →

Howto Install and setup TFTPD in Ubuntu workstation

May 20, 2009

I was doing my own project using TMS320DM355 EVM with MontaVista realtime Linux is installed some months ago.  At that time, I search in Google many times but I didn’t get success to install TFTP. Finally, I found out one great tutorial about that. In my system, I use TFTP protocol to download Linux kernel, [...]

Read the full article →