Results 1 to 2 of 2

Thread: How can i restore folders out of my .tgz backup file?

  1. #1
    Join Date
    Feb 2011
    Beans
    8
    Distro
    Ubuntu 10.10 Maverick Meerkat

    How can i restore folders out of my .tgz backup file?

    Hi,

    I'm using ubuntu for a few weeks now and i created a backup script that can copy some folders into a .tgz file. Now i want to place back the folders to where they come from and overwrite the original folder. like the /home folder in the .tgz file overwrite the /home folder on my harddrive. I already tried to do this with: tar xvpfz filename.tgz. But after that the folders came in the same folders as the backupfile stands.

    How can i do this the right way?

  2. #2
    Join Date
    Jan 2009
    Beans
    Hidden!

    Re: How can i restore folders out of my .tgz backup file?

    Either run tar from the directory where you want the archived files to be placed, which would require you to specify the full path the .tgz file, or add "-C /desired/directory" to the tar command line, which tells tar to change to the /desired/directory before extracting the archive.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •