Snapshot pragmatically back up and restore via api

Hello there,

I am developing some news sites for a client. He use rackspace cloud sites. Although you can set the time out up to 900 secs it will always show an error msg at 30 secs and the script will continue in the background.

After knowing those facts , I wan a solution for my following issue :

I want to pragmatically to backup and restore via snapshot plugin. I know I can use schedule to backup ,but I am building a platform for the network ,so I want to trigger the backup manually. Triggering the restore option is the big issue now and has higher priority. Is this possible ?! and how ?!

regards
Ayman

  • Nithin
    • Support Wizard

    Hi Magot John,

    I want to pragmatically to backup and restore via snapshot plugin. I know I can use schedule to backup ,but I am building a platform for the network ,so I want to trigger the backup manually. Triggering the restore option is the big issue now and has higher priority. Is this possible ?! and how ?

    I'm afraid, at the moment there isn't any API docs available for such tasks. Normally a restore from the Hub includes running the Snapshot installer script, so triggering a restore through another platform might sound like a complex task. I'll have to check this with the developer, and see whether there are any plans for such a procedure.

    Have a nice weekend. :slight_smile:

    Best Regards,
    Nithin

  • Kasia Swiderska
    • Support nomad

    Hello Ayman,

    Could you provide more information on what you want to achieve? If you are inside WP then why not use Snapshot options to restore site (or subsite)? if snapshot file is located on different location that your WordPress then first step is to import file.
    I feel I'm missing something here, so more information about the process would be really helpful.

    kind regards,
    Kasia

  • Magot John
    • Flash Drive

    Hello there,

    I want to do it "PRAGMATICALLY" like the title support says. Now you asking WHY I want to do it , right ?!
    Yes , I will be inside the wordpress ,but for the same reason you want to do anything PRAGMATICALLY is to save the time you deal with the interface. Like bulk importing woocommerce PRAGMATICALLY , or import / export theme settings. Same logic , I have pre-build / pre-configured wp install with all settings ready for all my favorite plugins.The next logical step to save more time is to import the snapshot PRAGMATICALLY. So according to the rackspace settings , If I run snapshot from inside it will succeed ,all I need is to wait the right time.

    Now when I explain why , please to proceed to how. Already wasted two days now :smiley:

    regards
    Ayman

  • Rupok
    • Support Ninja

    Hi Ayman,

    Thanks for your explanation. I've pinged our developer again regarding this and I believe, he will come up with his valuable feedback on this very soon. We will update you as soon as we get anything from him.

    Please keep in mind, our developers work around the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a feedback.

    I will appreciate your patience.

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi Magot John,

    I've got an update from our developer. He said, right now, triggering the backup/restore manually through API will require you to write your own controller for managed backups, but I'm afraid, there is pretty much no way yet to do this for regular snapshots with API. To get some idea regarding how you can create that custom controller, you can check the existing implementations from the /lib/Snapshot/Controller/Full from inside the Snapshot plugin directory on your server and, possibly extend from the existing Snapshot_Controller_Full class.

    I believe this will help. If this seems to be too complex to you, you can always hire another developer from our Jobs Section. Please keep in mind, developers found in our Jobs Section are not associated with us in any way. So communicate with them well before you make any payments to them.

    Please let us know if you have any confusion or any further query. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.