November 2013
« Oct   Dec »

How do I extract/retrive files from plesk backup ?

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

[root@u155sss63 ~]#  yum  install mpack
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mpack.x86_64 0:1.6-2.el5.rf set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
 Package                      Arch                          Version                              Repository                       Size
 mpack                        x86_64                        1.6-2.el5.rf                         rpmforge                         49 k
Transaction Summary
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
dump.xml (text/xml)
mydomain_db.mysql (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream) (application/octet-stream)
smime.p7s (application/x-pkcs7-signature)

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.

[root@u15526863 test]# ls 
mydomain.com_2013.10.23_07-00-04  smime.p7s    
[root@u15526863 test]#

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

[root@ud63]# tar -xvf

ok Cool .. . I would done !! 🙂

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>