I have backup Image backup_image.img.gz which is 250gb I would like to extract only 1 file which is /etc/csf/csf.conf from this .gz file. I would like also to keep backup_image.img.gz.

I used this this command to create archive

dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /ext/backups/backup_image.img.gz &

closed as unclear what you're asking by Michael Homer, Stephen Rauch, G-Man, slm Nov 12 '17 at 15:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    This is really "extract one file from .img archive", which requires knowing what format that image is in before it's possible to tell whether it's possible. I think it's unlikely, but you can edit in more information and somebody might be able to tell you. – Michael Homer Nov 12 '17 at 4:05
  • 1
    If this is a standard partition backup image (en.wikipedia.org/wiki/IMG_%28file_format%29) then i agree with Mr Homer it's unlikely that you can retrieve a single file, or any subset of files, until you reestablish the partition image. After-all it is just sequential disk sectors in this form. There isn't even an available directory structure until it's rebuilt. – Theophrastus Nov 12 '17 at 4:36
  • I don't know if this is standard archive or not I use this command to create archive dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /ext/backups/backup_image.img.gz & – danone Nov 12 '17 at 5:16
  • if it is not possible how can I extract .gz archive to same directory. – danone Nov 12 '17 at 5:21
  • 1
    You need to say what the filesystem on sda was. – Michael Homer Nov 12 '17 at 5:24

Browse other questions tagged or ask your own question.