Tag Info

Hot answers tagged

4

The steps highlighted at https://support.pivotal.io/hc/en-us/articles/202392488-gpdbrestore-gp-restore-fails-with-gzip-stdin-invalid-compressed-data-format-violated- fixed it for me: wget http://www.gzip.org/fixgz.zip unzip fixgz.zip gcc -o fixgz fixgz.c fixgz <corrupted_gzip_backup_file>.gz <fixed_gzip_backup_file>.gz This is weird, given ...


3

Your --directory suggests you're using either GNU or modern BSD tar. With GNU tar: tar --directory=/Users/joe/images --transform='s|[^/]*|common|' \ -czvf images.tgz dir1/image1.jpg dir2/image2.jpg With BSD tar: tar --directory=/Users/joe/images -s'|[^/]*|common|' \ -czvf images.tgz dir1/image1.jpg dir2/image2.jpg The idea being the same: replace ...


2

To make a copy of a filesystem as you want you have to be root. In addition you need a "clean version". As such you want to use a bind mount of your root so you get the entire filesystem as is. You may even be able to bind mount read only if you're worried about tar.


2

To confirm I follow you, there's the following items at play: An installation script (for the various tools in the tarball) A tarball with various tools packaged inside it (as shell scripts, some of which may not work with the parent OS) I'll assume you are admin on the machine you are uploading to. I think the right thing to do would be to put the ...


2

You can try following: tar -czf ./zips/someFile.tar.gz -C ./tmp/ someFolder


1

This should work, with some caveats. For one thing, beware of differing FS UUIDs; modern distros often list mounts in /etc/fstab via UUID, which won't survive making new FS and untarring (though it might survive a dd straight from one block device to the other). For another, you'll need to re-tweak GRUB to make it boot, making sure to give the proper set ...


1

The tar command does not zip. Not even with the -z flag. However, it does collect a series of files/folders and optionally compress the result. To contrast, zip compresses each file and adds it to an archive. zip and tar use different compression algorithms. The man page for tar shows the -C flag (--directory) to change directory, so you could do this tar ...


1

In principle, yes. But you forgot to specify the actual files or directories to add to the tar archive. Note also that if /home/backup is a directory you should use the test option -d. If OTOH you want to check whether there are files in the directory /home/backup you'd need an adjustment; to enter the files in that directory into the tar archive, this may ...


1

You can use the parameter -C or --directory tar -czf ./zips/someFile.tar.gz -C ./tmp someFolder From man tar -C, --directory DIR change to directory DIR Example % ls -og total 4 -rw-rw-r-- 1 0 Mai 21 18:39 bar drwxrwxr-x 2 4096 Mai 21 18:39 foo tar -cvf ../sample.tar -C /home/user/tmp . tar -tvf ../sample.tar drwxrwxr-x user/user 0 ...


1

First install XZ yum -y install xz then tar -xvf yourfile.tar.xz


1

Should work with the following command: tar -xvfz linux-2.6.32.65.tar.xz


1

It seems like copy parameter for unarchive module is what tripped you up. http://docs.ansible.com/unarchive_module.html states: -If copy=yes (default), local path to archive file to copy to the target server; can be absolute or relative. -If copy=no, path on the target server to existing archive file to unpack. In essence get_url downloaded your file to ...


1

Utilizing Joseph R.'s suggestion one can use the regex [^/]$ to grep for the files by looking for lines not ending with /. tar tzf archive.tar.gz | grep -e "[^/]$"



Only top voted, non community-wiki answers of a minimum length are eligible