Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
linux:tar [2013/03/25 17:58] – tmade | linux:tar [2018/02/15 13:16] – [TAR] tmade |
---|
(cd /orignl/path tar -cf - . ) | (cd /dst/dir;tar -xvf - ) #tar pipe to copy files, alternate to "cp -Ra" | (cd /orignl/path tar -cf - . ) | (cd /dst/dir;tar -xvf - ) #tar pipe to copy files, alternate to "cp -Ra" |
tar -czvf /mnt/test.tgz --one-file-system / #stay on filesystem = /dev/, /proc , /sys and all other mountpoints (if there are) aren´t in the file | tar -czvf /mnt/test.tgz --one-file-system / #stay on filesystem = /dev/, /proc , /sys and all other mountpoints (if there are) aren´t in the file |
| tar -xzf bar.tar.gz -C /foo #Untar "bar.tar.gz" to "/foo" directory |
| |
<code> | <code> |
First step: Make full backup | First step: Make full backup |
| |
tar –czf /mnt/newroot/full_backup.tar.gz /home | tar –czvf /mnt/newroot/full_backup.tar.gz /home |
| |
Second step: Make differential backup | Second step: Make differential backup |
| |
find /home –type f –newer /mnt/newroot/full_backup.tar.gz –print0 | tar ––null –cvf /mnt/newroot/backup_monday.tar.gz –T – | find /home –type f –newer /mnt/newroot/full_backup.tar.gz –print0 | tar ––null –czvf /mnt/newroot/backup_monday.tar.gz –T – |
| |
Note: | Note: |