cprevert - Fast file-level restore from cpbackup tarballs

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
Tired of it taking 20-30 commands and 20 minutes of fiddling just to restore one file from a cpbackup archive, only to discover it's the wrong file?

This command allows you to restore files from cPanel cpbackup tarballs in one command.
Example:
Code:
[host1:/home/fredshop/public_html/plugins]# cprevert error_log
user = fredshop
looking for ./public_html/plugins

--> 20100811_daily ... hfm
--> 20100810_daily ... hf(no change)
--> 20100809_daily ... hf(no change)
--> 20100808_daily ... hf(no change)
--> 20100807_daily ... hf(no change)
--> 20100806_daily ... hf(no change)
--> 20100805_daily ... hf(no change)
--> 20100805_weekly ... hf(no change)
--> 20100729_weekly ... hfm
--> 20100722_weekly ... hfm
--> 201007_monthly ... hf(not found)
--> 201006_monthly ... hf(not found)
--> 201005_monthly ... hf(not found)

Restored 3 distinct versions
[host1:/home/fredshop/public_html/plugins]# ll error*
-rw-r--r-- 1 fredshop fredshop 23565 Aug 11 13:12 error_log
-rw-r--r-- 1 fredshop fredshop 4713 Jul 21 15:10 error_log.bak_20100722_weekly
-rw-r--r-- 1 fredshop fredshop 22305 Jul 27 11:32 error_log.bak_20100729_weekly
-rw-r--r-- 1 fredshop fredshop 23145 Aug 3 20:28 error_log.bak_20100811_daily
[host1:/home/fredshop/public_html/plugins]#
Go here for the full article and download
 
Last edited: