sábado, 31 de agosto de 2013

Top 8 Tips For Backup And Restore In Linux

 Along with the commands, we are posting a video that makes the job even easier for you. 
Saturday, August 31, 2013 With growing popularity of Linux, system administrators are looking for ways to speed up backup and restore process. Try these tips while performing backup and restore in linux and make your life a little easier with Linux.

backup, linux, linux backup, Backup, Restore in Linux, restore data,  Incremental dumps, sending computer, Ubuntu Documentation, GNU tar manual


1. Before taking a backup of your system, be particular of what type of data you want to backup, (Is it a Complete or an Incremental or a Differential Backup?). You should also be certain of where to create the backup (Flash drive, Hard-disk, Over Network) and what to Backup.
2. To list all files in an archive file,

# tar -tvf archive.tar

3. If you want to verify that the backup made can be reinstated as once the data has been removed, you cannot restore the backup.

To check if your backup process is working adequately, use –compare (-d) option

# tar --compare --verbose -f backup.tar.gz

4. If your backup requires more than one tape, you are required to use the –multi-volume (-M ) option

# tar -cMF /dev/fd0H1440 /home/rabi/

5. Incremental dumps are dependent on time stamps, the results could be flimsy when you change a file’s time stamps during dumping, or if you set the clock in reverse.

6. You must ensure that the order in which you are taking out incremental backup as GNU tar attempts to reinstate the correct state of the file system when the archive was formed. Therefore, it will remove the file that did not exist when the archive was formed.

7. Backup over a Network
(a) Using Netcat

- In Receiving Computer, Setup netcat and enter:

# nc –l 1024 > backup.tar.gz

The choice of port is completely up to the user, provided it is 1024 or larger
- In Sending Computer, enter

# tar -cvpz / | nc -q 0 1024

In reinstate the name of the computer on the network.

(b) Using SSH

# tar -cvpz / | ssh "( cat > ssh_backup.tar.gz )"

ssh_backup.tar.gz refers to the name of the file that will be created on the indicated machine.
– Should be reinstated with the name of the computer on the network.

8. Restore over a Network

Receiving Computer

# nc -l 1024 | tar -xvpjf - -C /mnt/disk

You are required to mount the disk before implementing this command.

Sending Computer

# cat backup.tar.gz | nc -q 0 1024

(References: Ubuntu Documentation, GNU tar manual)

We also have a video titled Easy way to backup and restore Linux/Unix machines, which claims that 'this way to backup and restore your system is not very memory friendly, but it does the trick.' Have a look...


Top 8 Tips For Backup And Restore In Linux

Nenhum comentário:

Postar um comentário