Backup and entire dir using tar?
Bob Nielsen
nielsen at oz.net
Thu Jan 20 01:22:33 UTC 2005
On Wed, Jan 19, 2005 at 05:13:23PM -0800, Daniel Robitaille wrote:
> On Thu, 20 Jan 2005 06:53:38 +0800, Senectus . <senectus at gmail.com> wrote:
> > I want to tar up an entire directory and all the sub dir's in it as by
> > keeping all the permissions and structures as is..
> > I'm having a bugger of a time figuring out how it works.. whats the
> > best practice for tar.gz a dir with all sub dir for later restore..?
>
> to create:
> tar -cvf backup.tar directory_to_backup
>
> to extract:
> tar -xvf backup.tar
>
The question was about tar.gz, so that would change to
to create:
tar -cvzf backup.tar.gz directory_to_backup
to extract:
tar -xvzf backup.tar.gz
More information about the ubuntu-users
mailing list