One of today requirement is to retrieve the file which is uploaded to ftp few days back as the current file was some mistakenly clean up by somebody. So I has to get those specified files without restoring it to server since I have only Plesk backup in hand. I do not want full backup restore.
I tried gzip, untar command to extract the backup. Nothing going to help. A normal backup file name will be mydomain.com_2013.11.22_00-30-04 format.
How do I extract backup file,
a. You need “mpack” tools installed.
b. decompress the file using zcat
c. open the file using munpack
d. Extract the file using tar command
Say my backup file name is mydomain.org_2013.11.22_00-00-18
I have created a temporary folder to work with backup file and start the decompression activity.
1. Install munpack utility
You can download it from ftp://ftp.pbone.net/mirror/ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/i586/RPMS/mpack-1.6-alt1.i586.rpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
--> Running transaction check
---> Package mpack.x86_64 0:1.6-2.el5.rf set to be updated
--> Finished Dependency Resolution
Package Arch Version Repository Size
mpack x86_64 1.6-2.el5.rf rpmforge 49 k
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 49 k
Is this ok [y/N]:y
[root@u155sss63 ~]#mkdir /var/temp-bkp
[root@u155sss63 ~]# cd /var/temp-bkp
[root@u155sss63 ~]#cp /path/to/backup/mydomain.org_2013.11.22_00-00-18 .
[root@u155sss63]# zcat mydomain.org_2013.11.22_00-00-18 > mydomain
[root@u155sss63]# cat mydomain | munpack
munpack: reading from standard input
Now you can see few compressed files have been created by keeping the same plesk folder structure. These are compressed files.
NOTE: ‘munpack’ utility may not work with files greater then 2Gb and during dump extracting you may receive the error like,
File size limit exceeded
Now you need to use custom commands to extract the different modules instead of extracting everything.
check this url for more detailed. http://kb.parallels.com/en/1757
Now we need to extract the proper folder which we need to look. Here i’m using “httpdocs” for finding corrupted file.
3. Extract the webfiles folder
ok Cool .. . I would done !!