The one major advantage of Linux is that as root you have read/write access to every file on your system; this makes backing up possible with tar.
You should exclude any mount points which you don’t want to be backed up; I would recommend backing them up individually. You should also not back up /sys and /prc as these are created during boot up.
Tar options explained;
-c: create new archive
-p:absolute names to files. It does not strip of leading /
-z: applies gzip compression
-j:applies bzip2 compression. Slower but smaller
-f: creates a single file
–exclude: excludes directories.
cd / su tar cvpzf backup.tgz --exclude=/proc --exclude=/media--exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/mnt --exclude=/home/Data --exclude=/dev / <code>
cd / su tar cvpjf backup.tar.bz2 --exclude=/proc ..../ <code>
To restore copy the extract into the root directory (/)
For gzipsu cd / tar xvpfz backup.tgz -C /<code>
For bzipsu cd / tar xvpfz backup.tgz -C / <code>