You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please, make CDP provide a way to see the files inside backups and restore backups in a per file/dir way Ex.: I want to see if /etc/any.conf exists and restore it to the original node or for other.
Tar provides a way to list all files inside a tarball. You can find it at tar man(1) doc:
tar -tvf archive.tar
# List all files in archive.tar verbosely.
This should work for compressed files as well. Just put the flag that matches the compression algorithm that you have used:
$ tar -ztvf sometarfile.tar.gz
or
$ tar -jtvf sometarfile.tar.bz2
or any other algorithm.
If you are compressing with gzip or just putting files together without compressing it, you can use less:
$ less sometarfile.tar.gz
Less provides a very graceful output, just like ls -l. And tar does have a function to pull just one file or directory from one archive too:
$ tar -zxvf sometarfile.tar.gz somedir/subdir/justafile
If you want to pull a dir you just use the same command but point to the dir path inside the tar file. Note that you dont use a / at the beginning of the internat tar dir path:
$ tar -zxvf sometarfile.tar.gz somedir/subdir/
This works for any compression algo. used to compress the tarball. You can extract all files that match a wildcard inside the tar file:
tar -zxvf sometarfile.tar.gz --wildcards --no-anchored '*.conf'
Or the same wildcard inside a specific dir:
tar -zxvf sometarfile.tar.gz somedir/subdir/ --wildcards '*.conf'
Thank you for your time.
The text was updated successfully, but these errors were encountered:
Please, make CDP provide a way to see the files inside backups and restore backups in a per file/dir way Ex.: I want to see if /etc/any.conf exists and restore it to the original node or for other.
Tar provides a way to list all files inside a tarball. You can find it at tar man(1) doc:
This should work for compressed files as well. Just put the flag that matches the compression algorithm that you have used:
$ tar -ztvf sometarfile.tar.gz
or
$ tar -jtvf sometarfile.tar.bz2
or any other algorithm.
If you are compressing with gzip or just putting files together without compressing it, you can use less:
$ less sometarfile.tar.gz
Less provides a very graceful output, just like
ls -l
. And tar does have a function to pull just one file or directory from one archive too:$ tar -zxvf sometarfile.tar.gz somedir/subdir/justafile
If you want to pull a dir you just use the same command but point to the dir path inside the tar file. Note that you dont use a / at the beginning of the internat tar dir path:
$ tar -zxvf sometarfile.tar.gz somedir/subdir/
This works for any compression algo. used to compress the tarball. You can extract all files that match a wildcard inside the tar file:
tar -zxvf sometarfile.tar.gz --wildcards --no-anchored '*.conf'
Or the same wildcard inside a specific dir:
tar -zxvf sometarfile.tar.gz somedir/subdir/ --wildcards '*.conf'
Thank you for your time.
The text was updated successfully, but these errors were encountered: