Please do share share your feedback and queries in below comments section below. That’s all from this post, I hope you have found it informative. Entire folders can also be restored recursively. In case, there is an output then we can say that there might be some corruption in compressed tar backup. Linux dsmc (if not in PATH can be fount at /opt/tivoli/tsm/client/ba/bin. tar.bz2 $ tar -tvf system-back.tbz2 > /dev/nullĪbove commands should not produce any output on the screen. tar.gz $ gunzip -c system-back.tgz | tar -t > /dev/nullįor. To verify the integrity of compressed tar backup, use followingįor. In case of corruption, we will get the output something like below, If above command does not generate any output on the screen then we can say that there is no corruption. $ sudo tar -xpvf system-back.tgz -C /var/tmp/įor tar ball, use ‘-tf’ option and redirect the output to /dev/null file, $ tar -tf system-back.tar > /dev/null In the following example we are extracting system-back.tgz in /var/tmp folder. In case you want extract it in a particular folder then use ‘ -C’ option followed by the folder path. This command will extract system-back.tgz in the current working directory. Example is shown below $ sudo tar -xpvf system-back.tgz Use ‘ -x’ option in tar command to extract tar backup, complete option would be ‘ -xpvf’. Example is shown below: $ sudo tar -tvf system-back.tgz | grep -i etc/fstab To view the contents of tar backup, use ‘ -t’ option, complete options would be ‘ -tvf’. Run following command to exclude files mentioned in exclude.txt while creating tar backup of /etc $ sudo tar -X exclude.txt -zcpvf etc-backup.tgz /etc How to view the contents of tar backup? name: Copy folder contents recursively : src. In case your target filesystem does not support any of those options or you cannot use them due to missing permission, you can explicitly disable them via -no-perms, -no-owner, -no-group, -no-times, and -copy-links. To use exclude feature we must create a exclude file which will have file name to be excluded. No backup is taken when remotesrcFalse and multiple files are being copied. By default it uses the rsync options: -recursive, -perms, -owner, -group, -times and -links. To exclude a file while creating tar backup, use ‘ -X’ option followed by the exclude file. How to exclude file while creating tar backup? Note: We can not append files or folders to compressed tar backup as it is not supported. Let’s assume we want to append /root/app.yaml file to system-backup.tar, run $ sudo tar -rvf system-back.tar /root/app.yaml Let’s assume we want to take backup of / home/linuxtechi, /etc and /opt folder. To create a tar backup file, first identify the files and folders that would be part of your backup. zip backup, but when extracted it doesnt show any files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |