Backup tar.gz

Help with issues regarding installation of Debian

Backup tar.gz

Postby bdietric » 2020-04-08 08:54

Hi everyone, a company ask me to update an old mail server running Debian 5.0.8 and give me a backup .tar.gz. I would like to install it on a VM in Virtualbox but i read that a tar.gz backup can only be restore with tar xvpfz backup.tgz -C / . My question is if i'm running a debian 5.0.10 in VB and use that command do you think it will works ?

Sorry for my bad english i'm french...

Thank you.
bdietric
 
Posts: 1
Joined: 2020-04-08 08:49

Re: Backup tar.gz

Postby peter_irich » 2020-04-08 09:41

It will work if you will have been entering this command as root or through sudo.

Peter.
peter_irich
 
Posts: 1299
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: Backup tar.gz

Postby cooleo » 2020-04-08 11:46

Unread postby bdietric » 2020-04-08 08:54
Hi everyone, a company ask me to update an old mail server running Debian 5.0.8 and give me a backup .tar.gz. I would like to install it on a VM in Virtualbox but i read that a tar.gz backup can only be restore with tar xvpfz backup.tgz -C / . My question is if i'm running a debian 5.0.10 in VB and use that command do you think it will works ?

I think you had mis-typed the file name:
tar xvpfz backup.tgz -C /

and, what it dose is to RESTORE everything in your backup.tar.gz to /, not UPDATE.
Last edited by cooleo on 2020-04-09 01:37, edited 1 time in total.
cooleo
 
Posts: 28
Joined: 2020-04-07 05:28

Re: Backup tar.gz

Postby peter_irich » 2020-04-08 12:54

"f" must be the last options before archive file name.
Code: Select all
tar zxvf backup.tar.gz -C /


Peter.
peter_irich
 
Posts: 1299
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: Backup tar.gz

Postby Head_on_a_Stick » 2020-04-08 14:10

it would be faster to unpack the tarball, chroot into it (or use system-nspawn to open a shell), update the system from there and then repack it. No VM required.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12744
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Backup tar.gz

Postby cooleo » 2020-04-09 01:49

peter_irich wrote:"f" must be the last options before archive file name.
Code: Select all
tar zxvf backup.tar.gz -C /


Peter.


and,
"p" is necessary.
cooleo
 
Posts: 28
Joined: 2020-04-07 05:28

Re: Backup tar.gz

Postby peter_irich » 2020-04-09 05:22

From "man tar":
-p, --preserve-permissions, --same-permissions
extract information about file permissions (default for superuser)
peter_irich
 
Posts: 1299
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation


Return to Installation

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable