Activities

November 2013
M T W T F S S
« Oct   Dec »
 123
45678910
11121314151617
18192021222324
252627282930  

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 ftp://ftp.pbone.net/mirror/ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/i586/RPMS/mpack-1.6-alt1.i586.rpm

[root@u155sss63 ~]#  yum  install mpack
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 Finished
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
=======================================================================================================================================
Installing:
 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)
mydomain.org.httpdocs (application/octet-stream)
mydomain.org.httpsdocs (application/octet-stream)
mydomain.org.cgi-bin (application/octet-stream)
mydomain.org.webstat (application/octet-stream)
mydomain.org.webstat-ssl (application/octet-stream)
mydomain.org.ftpstat (application/octet-stream)
mydomain.org.error-docs (application/octet-stream)
mydomain.org.private (application/octet-stream)
mydomain.org.logs (application/octet-stream)
mydomain.org.anon-ftpstat (application/octet-stream)
mydomain.org.anonftp.pub (application/octet-stream)
mydomain.org.anonftp.incoming (application/octet-stream)
smime.p7s (application/x-pkcs7-signature)
[root@u155sss63]#

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

[root@u15526863 test]# ls
brian@mydomain.com.attach  mydomain.com.ftpstat
brian@mydomain.com.mdir    mydomain.com.httpdocs
brian@mydomain.com.sa      mydomain.com.httpsdocs
brian@mydomain.com.attach         mydomain.com.logs
brian@mydomain.com.mdir           mydomain.com.private
dump.xml                                  mydomain.com.webstat
                          mydomain.com.webstat-ssl
mydomain.com_2013.10.23_07-00-04  smime.p7s
mydomain.com.anon-ftpstat         test@mydomain.com.attach
mydomain.com.cgi-bin              test@mydomain.com.mdir
mydomain.com.error-docs
[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 mydomain.com.httpdocs
./
./css/
./css/style.css
./css/tabs.css
./css/winxp.blue.css
./favicon.ico

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>