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 read about it in this tutorial. ===== Introduction ===== Single directory structures can be backed up well 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 owners * -v : verbose/show what is archived * -l : link?/do not follow links to other partitions * -f : file/it is a file, so in this case a file is created The path to the archive can be absolute (/path/... ) or relative (./path/... or path/... ). ===== Zipping ===== You can now compress the archive, e.g. with gzip: <code bash> gzip meinArchiv.tar </code> ===== md5sum ===== Before downloading the file, e.g. from a web server, you should calculate the md5 sum for verification. "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 numbers. You can also redirect the output of md5sum to a file and download it at the same time. This way you always have the total with the backup: <code bash> md5sum meinArchiv.tar > meinArchiv.md5sum.txt </code> ===== Unpack ===== Once the archive has been gzipped, it can be unpacked with: <code bash> tar -xzvf meinArchiv.tar.gz </code> * -x : extract/extract * -z : zip/decompress * -v : verbose/display on the console what is being unpacked * -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 look into an archive and unpack parts or all of it with MidnightCommander (mc). Further help is available: <code bash> man tar </code>Please solve the following equation to prove you're human. 160 -12 = 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