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

Backups Downloaded via RPC API are not valid

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by christoph_peter, Apr 17, 2012.

  1. christoph_peter

    christoph_peter Guest

    0
     
    I can retrieve the list of backups and download the backupfiles from my server via the API. When I try to upload them again the server tells me they are invalid. One thing I noticed is they are not tar files unlike the files I get when I manually download a backup.

    3571: 2012-04-17 22:53:09,245 DEBUG --> <pmmcli.ImportFileAsDumpAction object at 0x1477710>
    3571: 2012-04-17 22:53:09,245 INFO stdin: <src-dst-files-specification guid="6fb5b258-4681-4c55-93f6-a1abf8eb4111" type="domain"><src><dumps-storage-credentials storag$
    3571: 2012-04-17 22:53:09,248 INFO Packet succesfully validated.
    3571: 2012-04-17 22:53:09,249 DEBUG <pmmcli.ActionRunner object at 0x14776d0>: doActivity
    3571: 2012-04-17 22:53:09,251 INFO Executing <subprocess[3572] '/opt/psa/admin/bin/pmm-ras --import-file-as-dump --dump-file-specification=/tmp/phpfrogar --dump-storag$
    3571: 2012-04-17 22:53:09,340 INFO Subprocess raised ExecuteException: Subprocess <subprocess[3572] '/opt/psa/admin/bin/pmm-ras --import-file-as-dump --dump-file-speci$
    == STDOUT ====================
    Repository error: Unknown archive type. Could not get converter for specified dump file 'phpfrogar'

    == STDERR ====================

    3571: 2012-04-17 22:53:09,340 DEBUG Import file operation ended with errcode=152. Filename is None
    3571: 2012-04-17 22:53:09,341 DEBUG <pmmcli.ImportFileAsDumpAction object at 0x1477710>: response
    3571: 2012-04-17 22:53:09,341 INFO Outgoing packet:
    <?xml version="1.0" encoding="UTF-8"?>
    <response>
    <errcode>152</errcode>
    <errmsg>The file you are trying to upload is not a valid backup file</errmsg>
    </response>

    the log files also suggest that its an issue with the compression of the backup files. the api documentation does not give any hint about this. I write the data directly to a file as I get it from the server. is there something I need to do with the data, compress it somehow, or should the server do this?
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,242
    Location:
    Novosibirsk, Russia
    Do you have installed Plesk 10.4.4 MU10? http://kb.parallels.com/en/113085

     
  3. christoph_peter

    christoph_peter Guest

    0
     
    Ah I should have included this information:

    OS Linux 2.6.32-5-amd64
    Panel version 10.4.4 Update #26
    The system is up-to-date; last checked at April 16, 2012 06:48 AM

    So I think I am running the latest version available.
     
  4. christoph_peter

    christoph_peter Guest

    0
     
    Also uploading and reimporting it via the API returns the same error
     
  5. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,242
    Location:
    Novosibirsk, Russia
  6. christoph_peter

    christoph_peter Guest

    0
     
    the files I get via the API are binary as far as I can tell, so I can't validate them. this is a sample of the file that I get after download. http://cl.ly/3L080E0J2c2R003g210T - I also tried to piping the request to the browser and letting the browser handle the download, but it every method creates the same file. it has the right size, so I think the data is all there, its a matter of encoding / compression since this is also where the importer throws the errer
     
  7. christoph_peter

    christoph_peter Guest

    0
     
    This is a sample of the script I am using

     
  8. christoph_peter

    christoph_peter Guest

    0
     
    I think I found the cause for the issue - the downloaded file contains a string at the binging "file size = number of bytes" that should not be there. if I remove the string manually, the file is a actual tar file and also a valid backup file. it is possible to strip this post download, but it should get fixed on the server side as well.
     
Loading...