The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

restore incremental backup from shell without tar

Discussion in 'Data Protection' started by syslint, Aug 26, 2010.

  1. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just curious , any way to restore cpanel incremental backup without "TAR or GZIP " from the shell . ?
     
  2. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
  3. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    I'm lost. What do you mean, "without tar or gzip"?

    The backup files are packed with tar and gzip and files cannot be extracted without tar and gzip. It's like trying to extract a zip file without zip! Or trying to open a can without a can opener!
     
  5. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Did you read the first post " any way to restore cpanel incremental backup without "TAR or GZIP "

    SO how come an incremental backup use tar . The cPanel incremental backup just sync the files without compression. I know how tar and zip things are working I am with linux more than 14 years as a developer , tech , etc,.

    All my incremental backups for to /backup/cobackup/daily/username/ . There is to tar file or compression

    If in need to restore this file from shell I need to TAR this folder. BUt I am looking to restore it without tar or gzip. May be it will be good cPanel add this feature like
    /script/restorepkg --type=incremental --path=/backup/cobackup/daily/username/ in future
     
  6. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    cd /backup/cobackup/daily/username/homedir
    (the homedir part is just a guess)
    tar cf - . | (cd /home/username; tar xvf -)

    However, that uses tar, for which I will get in trouble ;), so perhaps replace tar with cpio, or find . -cpio or similar.

    Perhaps if you say why you don't want to use tar? It's hard to help without knowing that!

    I understand you're looking for one-command restore for incrementals, right? Could that use tar internally?
     
  7. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yes,

    The reason is for incremental backup it won't use tar , so why we need to use tar to restore an incremental backup . :)
    PS: I know to restore an incremental backup manually without tar. just looking for cPanel specific solution
     
  8. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    I don't think cPanel have managed to craft any sort of incremental restore. I can understand one possible reason - it's hard to know what one would restore - an individual file, everything that's been backed up, files newer than a certain date etc - so I imagine very hard to write an interface for it. It's all manual commands at this stage.

    Seems like your objection to tar is more or less theoretical, so I guess you have your answer! The tar use in the last example was just because it's a convenient way of restoring an incremental - not sure that "cp -r" would work as you want to overlay the individual files over the top of what you have in the account.
     
Loading...

Share This Page