You've loaded an old revision of the document! If you save it, you will create a new version with this data. Media Files====== Linux backup with tar ====== How to make a backup of directories with tar? You can find out in this tutorial. ===== Introduction ===== Individual directory structures can be easily backed up with "tar". You simply create an archive: <code bash> tar -cpvlf meinArchiv.tar /Pfad/zu/meinen/Originalen </code> An archive is now created with the following buttons: * -c : create/create * -p : permissions/get me the rights and owner * -v : verbose/show what is archived * -l : link?/do not follow links to other partitions * -f : file/it is a file, in this case a file is created The path to the archive can be absolute (/path/... ) or relative (./path/... or path/... ). ===== Zipping ===== You could now compress the archive, e.g. with gzip: <code bash> gzip meinArchiv.tar </code> ===== md5sum ===== Before you download the file from a web server, for example, you should calculate the md5 sum to check it. "md5sum" generates a unique number that changes if the downloaded file differs from the original. The md5 sum of a file can be calculated as follows: <code bash> md5sum meinArchiv.tar.gz </code> After downloading "myArchive.tar.gz", run the programme again on the target computer and you can compare the figures. The output of md5sum can also be redirected to a file and downloaded at the same time. This way you always have the total with the backup: <code bash> md5sum meinArchiv.tar > meinArchiv.md5sum.txt </code> ===== Unpack ===== You can unpack the archive again after it has been gzipped with : <code bash> tar -xzvf meinArchiv.tar.gz </code> * -x : extract/unzip * -z : zip/decompress * -v : verbose/print on the console what is unzipped * -f : it is a file If the archive has not been compressed, simply omit the z: <code bash> tar -xvf meinArchiv.tar </code> If you only want to restore individual files from the archive, enter them after the archive name: <code bash> tar -xvf meinArchiv.tar /Pfad/zu/meinen/Originalen/config.conf </code> You can use MidnightCommander (mc) to look into an archive and unpack parts or all of it. Further help is available: <code bash> man tar </code>Please solve the following equation to prove you're human. 67 -0 = Please keep this field empty: SavePreviewCancel Edit summary Note: By editing this page you agree to license your content under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International