domingo, 13 de janeiro de 2008

How to make a backup in linux ubuntu

Once you have your laptop in perfect conditions the first thing that i advise you to do is to make a backup, in case that something goes wrong or you make something that would damage your operative system you can make the time go back and make your ubuntu just like when it was before:)
The first thing to do is to open the terminal, then:

Become Root:
& sudo su

Move to the file sistem /:
& cd /

And now we going to make the backup using the tar command:
& tar -cvpzf /backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/media /

And your backup is done and saved in your /home folder:)
If you want you can copy it to another partition for safe keeping but leave the original in /home.

If something happends to your system and you want to restaure your system use the following command:

Become Root:
& Sudo su

Move to /:
& cd /

Then restaure:
& tar xvpfz backup.tgz -C /

And just watch your system being restaured in the console, once it is done restart your sistem and it should be like it was at the time of the backup:)

Very important!!!
The first next thing to do once you log in is to recreate the folders that were left out of the backup:

& mkdir proc
& mkdir lost+found
& mkdir mnt
& mkdir sys
& mkdir media

And its done, theres also a way to restaure when you cant login in your system trough your live CD but that ill explain later:)
This how-to was based on:

Sem comentários: