How to make a backup in linux
Author : Aperell
From TechnologicalWiki
You can use Ubuntu or other Linux distros with Tar pakage installed. we will use this utility for compress certain directories of our system.
[edit] Backup your System
Open a root terminal then type this:
tar cvzpf /home/Backup.tgz --same-owner --exclude=/home/Backup.tgz --exclude=/home/error.log --exclude=/proc/* --exclude=/media/* --exclude=/dev/* --exclude=/mnt/* --exclude=/sys/* --exclude=/tmp/* / 2>/home/error.log
- c creates a tar backup
- v activates verbose mode
- z will compress data using gzip format
- p preserves file permissions
- f sends output to a file instead of standard output.
- /home/backup.tgz is the output file, the container of our backup.
- --same-owner Preserve file owner
- --exclude will don't read the pathwill don't read the path
- / Path to compress
- 2> /home/error.log Save activity log in /home/error.log
[edit] Restoring your System
Open a root terminal then type this:
tar xvzf /home/Backup.tgz -C /
Your system will be restored.


