But does my above code back up MBR and filesystem?
No. It backs up the contents of the filesystem.
Not the MBR which is not a file but is contained in a sector outside the file systems.
And not the filesystem with it potentially tweaked settings and or errors, just the contents of the file system (granted, that is a minor difference).
and if in need of any hardware problem, restore it with
tar -zxpvf fullbackup.tar.gz
Will the above code be enough to bring the same server back?
Probably, as long as you use the same setup. The tarball will just contain the files, not the partition scheme used for the disks. So you will have to partition the disk in the same way. (Or copy the old partition scheme, e.g. with
dd if=/dev/sda of=myMBRbackup bs=512 count=1).
Note that there are better ways to create backups, some of which already have been answered in other posts. Personally I would just backup the configuration and the data. Everything else is merely a matter of reinstalling. Possibly even with the latest version.
Also not that tar will backup all files. The first time that is a good thing.
But if you run that weekly or daily you will get a lot of large backups. In that case look at rsync (which does incremental changes) or one of the many other options.