1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

MI:4 - extract files from psadump

Discussion in 'Plesk for Linux - 8.x and Older' started by absert, Jan 3, 2007.

  1. absert

    absert Guest

    0
     
    Hi!

    I make a dump with pleskbackup (plesk 8) and now I need some files inside that backup.

    I have readed posts in this (and others) forum about how to unpack it. Well it's not seems difficult I thought.

    First I copy the file my_backup.gz in /tmp/dump folder. I unpack it using gunzip and I obtain other file called: "my_backup".

    Later I compile ripmime and use it like:
    ripmime -v -i my_backup -d 123

    Now I can see my database's sql dumps in /tmp/dump/123 folder and a few files more but I need to extract my htmls files from some of those unpacked files.

    I found files with htdocs extension. If I open it whith "vi" I can see the files but I don't know what can I must do to unpack its.

    I used pax, tar, cpio, gunzip, zip and every possible combination but nothing happens :S

    The header of that file is something like that:

    Code:
    ./                                                                                                  0000750 0023470 0004732 00000000000 10507440575 012532  5                                                                                                    ustar   mi_user                        psaserv                         0000000 0000000                                                                                                                                                                        ./index.html                                                                                        0000755 0023470 0023421 00000000147 10507440575 014332  0                                                                                                    ustar   mi_user                        psacln                          0000000 0000000                                                                                                                                                                        <html>
    <head>                                                                                                         
    The backup was made by plesk 8
    ¿Anybody knows how I can unpack that file to obtain my htmls files?

    Thanks.
     
  2. absert

    absert Guest

    0
     
    Nobody can help me?

    I need to unpack that file :'(

    Please help.
     
  3. Traged1

    Traged1 Guest

    0
     
    Did you ever figuire this out? I need to do the same thing, any help at all out there?
     
  4. sieb@

    sieb@ Guest

    0
     
    This has always been a problem with linux dumps that I wish they would fix. On Windows Plesk boxes, the backup is just a zip file, on linux, its an encoded mime file with no way of figuring out what is where. Everything is stored in numbered folders and no way of knowing what is what unless you can do a search through them all for the files you need. I've never had much luck myself, not without restoring it all to a temp server.
     
  5. Traged1

    Traged1 Guest

    0
     
    ****, I need to restore one html file and the dump is over 12Gb in size. That is no good. As a matter of a fact , I tried to rename the dump as a .gz file to gunzip it, but when I do so gunzip tells me that the file is not in gzip format. So it may appear that with PLESK 8.1 the new dumps format has changed again?
     
  6. k.satirli

    k.satirli Guest

    0
     
    ive had similar problems (was unable to fix them) but this is how far ive gotten:

    the backup consists of 3 layers:

    1.) GZip encoding
    2.) UU encoding
    3.) I dont know.

    if you go to /var/lib/psa/dumps/<cID>/<dID>/ and rename your backup to backup.gz you can gunzip it.

    It will show up in Plesk's Backup and Restore feature just fine, since the actual content hasnt changed, it just became a lot smaller.

    Then, you'll need a MIME decoder, I suggest http://www.fpx.de/fp/Software/UUDeview/ - I've used that to unpack my files in some cases.

    In other cases, the tool complained about the backup being corrupt, even though it shows up fine in Plesk.

    Your mileage may vary of course.
     
  7. Dmitry Frantsev

    Dmitry Frantsev Golden Pleskian

    28
    57%
    Joined:
    Sep 19, 2005
    Messages:
    1,911
    Likes Received:
    0
    Below I will list the procedure which I used for getting specified folder from Plesk backup. In the example, I used Plesk domain backup:

    Mpack tool is required in this case to work with MIME files. I have FC4 and got this package from here:

    https://sourceforge.net/project/showfiles.php?group_id=28610&package_id=73162&release_id=137934

    You can find there as RPM as well as source RPM packages. So instructions are simple:

    Create an empty directory to restore the back up file:

    # mkdir recover
    # cd recover

    Create ungzipped copy of the backup in the current directory.
    # gunzip < /PATH_TO_BACKUP/BACKUP_FILE > domain-backup.mime

    Run munpack to extract content of directories from the backup file
    # munpack domain-backup.mime
    # ls -al

    Untar the needed directory. For example if you need to restore httpdocs:

    #mkdir httpdocs/
    # tar xvf DOMAIN.TLD.httpdocs -C httpdocs/

    In destination directory - httpdocs you should get all files.

    I hope it helps.
     
  8. k.satirli

    k.satirli Guest

    0
     
    this is awesome information and surely did help.

    thanks to you I was able to restore a backup that plesk didnt want to restore.

    thank you very much
     
  9. Traged1

    Traged1 Guest

    0
     
    yes thank you, would anyone know if this proceedure would also work with PLESK for Windows psadumps? Or is the structure and compression different?
     
  10. k.satirli

    k.satirli Guest

    0
     
    as far as I know, the backups in windows are simple zip files, so you should be able to just extract them.

    not sure though.

    if you can, create a new domain, upload a few files to the htppdocs directory (one plaintext, one image for example) and create an email account.

    then, backup the domain, find the backup and post the link to it here, so someone can look at it.
     
  11. Traged1

    Traged1 Guest

    0
     
    Yes they were always zip files, but recent reports since the PLESK8.1 upgrade customers have reported that they are no longer able to open Plesk Windows backup files. I will double test this. Thanks again.
     
  12. Traged1

    Traged1 Guest

    0
     
    Nope, my mistake, I just double checks the PLESK/WIN backups and they are in fact simply .zip files.
     
  13. k.satirli

    k.satirli Guest

    0
     
    well good to know :)

    SWSoft just went for the most logical compression scheme on each system I guess
     
  14. Jllynch

    Jllynch Regular Pleskian

    28
     
    Joined:
    Nov 11, 2003
    Messages:
    242
    Likes Received:
    0
    I tried the directions from Dmitry above but all I got after the munpack was 19 part1 files and 1 part1.desc. How do I extract info from these parts?
     
  15. Dmitry Frantsev

    Dmitry Frantsev Golden Pleskian

    28
    57%
    Joined:
    Sep 19, 2005
    Messages:
    1,911
    Likes Received:
    0
Loading...