Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member This forum account has been confirmed by cPanel staff to represent a vendor. syslint's Avatar
    Join Date
    Oct 2006
    Posts
    145

    Default restore incremental backup from shell without tar

    Just curious , any way to restore cpanel incremental backup without "TAR or GZIP " from the shell . ?

  2. #2
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Yes, you can use this shell script:

    cprevert – easy cpbackup file level restores | whmscripts

    It uses gzip and tar internally to unpack and extract individual files from the cpanel backups. It makes it possible to restore a file with a one-line command.

    Also referred to in this forum where I released it.
    White Dog Green Frog - web hosting and web development since 2002
    Blogs: SMB web use cPanel/WHM scripts

  3. #3
    Member This forum account has been confirmed by cPanel staff to represent a vendor. syslint's Avatar
    Join Date
    Oct 2006
    Posts
    145

    Default

    Quote Originally Posted by brianoz View Post
    Yes, you can use this shell script:

    cprevert – easy cpbackup file level restores | whmscripts

    It uses gzip and tar internally to unpack and extract individual files from the cpanel backups. It makes it possible to restore a file with a one-line command.

    Also referred to in this forum where I released it.
    No it is not that . Please read first post " WITHOUT TAR OR GZIP"

  4. #4
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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!
    White Dog Green Frog - web hosting and web development since 2002
    Blogs: SMB web use cPanel/WHM scripts

  5. #5
    Member This forum account has been confirmed by cPanel staff to represent a vendor. syslint's Avatar
    Join Date
    Oct 2006
    Posts
    145

    Default

    Quote Originally Posted by brianoz View Post
    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!
    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. #6
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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?
    White Dog Green Frog - web hosting and web development since 2002
    Blogs: SMB web use cPanel/WHM scripts

  7. #7
    Member This forum account has been confirmed by cPanel staff to represent a vendor. syslint's Avatar
    Join Date
    Oct 2006
    Posts
    145

    Default

    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. #8
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by mastersherin View Post
    PS: I know to restore an incremental backup manually without tar. just looking for cPanel specific solution
    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.
    White Dog Green Frog - web hosting and web development since 2002
    Blogs: SMB web use cPanel/WHM scripts

Similar Threads & Tags
Similar threads

  1. Shell script for backup and restore
    By inddeveloper in forum Data Protection
    Replies: 4
    Last Post: 08-28-2010, 09:24 AM
  2. How to restore incremental backup
    By ljesh in forum Data Protection
    Replies: 7
    Last Post: 01-09-2009, 04:50 AM
  3. How to restore incremental backup?
    By hbhb in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 03-22-2007, 11:19 AM
  4. Incremental or tar backups... whihc is better?
    By Snowman30 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-18-2007, 07:15 PM
  5. Incremental vs. tar.gz backup
    By 0utlier in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-20-2005, 07:39 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube