How to backup entire systeM?!?!?!



Hello and yes, I am NOT fluent in GNU/Linux just yet, but after countless hours of reading and looking at vids and other forums I still dont fully know how to backup the entire GNU/Linux system. Please, for the love of the stars could someone please explain:
1. How to FULLY backup the entire GNU/Linux system(in case of hard drive failure, I can simply reinstall the o.s., then restore EVERYTHING from the backup)

Thanks so much for your time and effort into my some what noob of a question. And have a great day.

This question is not as easy to answer as it seems because it really depends on the sort of problems you anticipate, what you do with your machine, and how you plan to restore it, if it should fail.

For system settings, user accounts, etc., you will need to backup /etc (which has /etc/passwd, /etc/shadow, /etc/group, etc.) and /home.

For a quick summary, consider backup these:
  • /etc/ (everything)
  • /home (everything)
  • /var/spool/mail (of course, if you use a web-based mail service, e.g., Gmail, or if you backup your mails elsewhere, then you can safely ignore this)
  • /boot
  • /root
  • /usr/local
  • /opt
This system is the gateway for c.c. transactions, and incase of a hard drive failure, I want to feel safe knowing that I can easily install GNU/Linux on a new hard drive then recover EVERYTHING through the backup. So,:
1. How do I backup the entire system?
2. What are the specific steps I would take if I do have to recover everything from the backup?

Please be very specific in you're reply. And once again, thanks so much for your time and knowledge.
I recently backed up everything with the tar command. Then tried to restore through a vm to see what got restored, and unfortunately my users did not come back. I am concerned. Here is my backup command:
tar cvpzf backup.tgz --exclude=/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt /

Here is the restore command I used after I placed my backup file in the root directory of my fresh install:
tar xvpfz backup.tgz -C /

I just want to be reassured/feel comfortable that everything thats on the GNU/Linux system will come back through the backup file when I restore with it. Btw, this is a barebones system. No GUI at all. Only command line style. Thanks and I will give thanks.

Members online