Making a Home Direct Backup the Simple Way
After all the configuring you may do to your linux machine, it would be sad to see it all go down the drain in some unforseen event. This is where making a backup of your home folder can come in handy. It’s not quite an ISO that you can boot off of, but if you are trying to reference certain config files in the future you’ll know where to look.
The Simple Way: Tar
It’s as easy as one tar command.
First plug in your external harddrive.
lsblkto see which dev identifier it has your harddrive was assigned.
mountto mount the harddrive so that you can start interacting with it. In my case my harddrive was at
/dev/sba1, and I chose to mount it at
--excludeflags in order to avoid a slowdown copying over unimportant information. Make sure to check out the man page.
-cindicates creating a new archive.
-vmakes it verbose so that you can see what’s being copied over.
-zfilters the archive through gzip.
-findicates where to save the new archive. The last argument indicates which directory to make an archive of.
All done! Make sure to test it out in order to verify that everything worked as you expected. It’s not fun to find yourself in a situation where you’ll be relying on your home backup, only to find out that your previous attempt isn’t going to cut it.
I may look into more advanced backup solutions in the future (maybe cronjobs), but until then this was enough to help me sleep better at night :)