Tag Archive


amateur astronomy awk bash b[e] supergiant cartoon conference convert evolved star exoplanet fedora figaro fits fun galaxy history iraf large magellanic cloud latex linux lmc machine learning magellanic clouds massive star matplotlib meteor mypaper paper peblo photometry planet pro-am pyraf python red supergiant scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk ubuntu university of crete video x-ray

Linux backup and restore filesystem –notes

A quick note on how to backup and restore (if necessary) the filesystem. We go to the root directory (/) and as root we run:

tar cvpzf backup.tgz --exclude=/lost+found --exclude=/backup.tgz /

c: create new archive
v: verbose
p: preserve permissions
z: gzip
f: use file (name of file=backup.tgz)

We exclude all the directories that we don’t want to back up (and especially the backup file itself!) and … run it!

In order to restore the system, we go again to the root directory and (as root) we run:

tar xvpfz backup.tgz -C /

WARNING: this will overwrite everything we have under your root directory (everything … means everything!).

-C: change to directory

After that, we re-create the excluded directories (like: mkdir lost+found) and we reboot our system!

[source]