linux - How to extract archive from this script (using tar) -


I do not know exactly how to unpack a built-up archive. I'm giving you the full script A Debian-based distribution named Univalense uses this to backup many files in the tar archive.

The real collection is packed in a function. The main content where they make the actual tar file:

  cat "$ TMPDIR / freeinfo.txt" & gt; & Gt; "$ TMPDIR / Installinfo.txt" 2 & gt; / Dev / null echo & gt; $ TMPDIR / endtag.txt echo "%%%% OXBACKUP _ $ {DATE} _HEADER_ENDTAG" & gt; & Gt; "$ TMPDIR / endtag.txt" BACKUPINFO = "$ BACKUPINFO endtag.txt" cat 2 & gt; / Dev / null & lt; & Lt; EOF & gt; "$ TMPDIR / Installinfo.sh" BACKUPHOSTNAME = "$ hostname" BACKUPDOMAINNAME = "$ domain name" BACKUPBASEDN = "$ ldap_base" BACKUPTIMEZONE = "$ (cat / etc / timezone)" BACKUPLANG = "$ (echo $ locale_default)" BACKUPPSAMBADOM = "$ Windows_domain" backpacebbsteled = "$ sambanstalled" back apoxenation version = "$ integration" back upslave = "$ (get wreck-config-registry version / security-patchlay)" backup = 2 SECRETFILES = "$ SECRETFILES" other FILES = "$ OTHERFILES" OXCONFIG = "$ OXCONFIG" CRONTABS = "$ CRONTABS" CERTIFIm = "$ CERTFILES" EOF pstatus = () # # stdout # sync in real backup; Sync; Sync RETVL = $ ((Tank CO $ backup2> / dev / null tar cO $ SECRETFILES 2 & gt; / dev / null tar cO $ other files 2 & gt; / dev / null tar cO $ OXCONFIG 2 & gt ; / Dev / null tar cO $ crontabs 2 & gt; / dev / null tar cO $ CERTFILES 2 & gt; / dev / null [-f $ EXTRAFILES] & Terra - NO-recursion-T $ EXTRAFILES-2 & Gt; / dev / null tar - no-recursion --null -T dirlist_mailandfilestore -cO2> / dev / null tar --null -t filelist_mailandfilestore -cO2> / dev / tap tar --no- Use us out with recursion --null -t dirlist_shares -cO2> #smpclient, perl, scp, / dev / null tar #nl -t filelist_shares -cO2> / dev / null) until we ## Stripped Protocol Living in a Specific Thing ... Curl case does not receive "$ BACKUPPROTOCOL" (*) $ * {$ LOGFILE} _ $ {DATE} & gt; $ {BACKUPPATH: - $ DEFAULTBACKUPPATH} / Backup _ $ DATE & amp; amp; Echo "201" chmod 640 "$ {BACKUPPATH} / backup _ $ DATE" & gt; / dev / null 2 ​​& gt; and 1 Crown Route: www-data "$ {BACKUPPATH} / Backup _ $ DATE" & gt; ; / Dev / null 2 ​​& gt; And 1 if [[x] "$ BACKUPPATH"! = X & amp; "$ BACKUPPATH"! = "$ DEFAULTBACKUPPATH"]]; Then fix # temporary permissions ln -sf "$ {BACKUPPATH} / backup _ $ DATE" "$ DEFAULTBACKUPPATH /" fi ;; Esac)  

On the storage system is 54 GB, tar will only pick the first level of the xvf archive. Excuse me, I get only 54 MB to 40 MB in everything

$ ((tar ... tar ...) | dd> foo)

Use complete Well, I do not know this, what does this script do?

I think I got a solution (I update the script a little bit): The script generates a tag that is a symbol of the end of the archive first. I used grep -A1 -a -b "HEADER_ENDTAG" backup. Tire 41247795 dd skip = 41247795 if = .. / .. / backup of = test

It seems that now I am "real " collection. Is this byte the second way to automatically jump on offset, e.g. Without using Grep manually?

Your script seems to add multiple tar files together in a large file to remove a section For, I use shell function / script like this:

File tarsection:

  #! / Bin / sh tar_section () {local x = 1; Whereas [$ x -lt $ 1]; Tar t & gt; / Dev / null || Copy "section $ x" and gt; And change in 2 x = $ (($ x + 1)) "" $ @ "} tarfile =" $ 1 "shift tar_section" $ @ "& lt;" $ Tarfile " 

Then you can (for example, for Part 3 of the larger file):

  tarsection YOUR_54GB_BACKUP_FILE 3 -t | Less CD ... Extract Block Transaction YOUR_54GB_BACKUP_FILE 3 -x  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -