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
# nc -l 1024 | tar -xvpjf - -C /mnt/disk
You are required to mount the disk before implementing this command.
# 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