Updating files using SFTP or modifying the DB may result in potential data loss. Before making changes, lets help the customer by displaying when the last full site backup occurred.
Here's a mock of how to introduce displaying the last good backup鈥攁 new card labeled Site backup
Site backup card:
Button links to the activity log, where if I'm reading "I can add enhancement issues for adding the explicit backup request" correctly, they should have a way to initiate a backup once the enhancement issue is worked on. If not, and we're doing it within the SFTP/MySQL page, the button should start the backup.
In page:
cc @singerb for technical feasibility
cc @apeatling @shaunandrews @olaolusoga
List of current API endpoints is at Pa0RFL-ct-p2.
lets help the customer by displaying when the last full site backup occurred
D34701-code, which should ship today, adds a last_good_backup
(a unix timestamp) field to the state endpoint GET /wpcom/v2/sites/<site_id>/rewind
.
and if technically possible, add the ability to trigger a full site backup.
There is currently not a Calypso endpoint for triggering a backup, but there is no barrier to creating one. For the wpcom-side implementation, vaultpress-api-client.php
has a site_queue_backup()
method.
There is currently not a Calypso endpoint for triggering a backup, but there is no barrier to creating one.
Are there any concerns about additional load here, or would we be able to build one?
would we be able to build one?
It would be best if you could build this, with support and reviews from Chronos. The restore endpoint linked from Pa0RFL-ct-p2 should serve as a good example. (POST /wpcom/v1.1/activity-log/<site_id>/rewind/to/<timestamp>
)
Also see the "Queue Backup" button in the Rewind Debugger in MC as an example.
An alternative (MVP?) approach would be to link to the Activity Log, filtering on backup events, like:
https://wordpress.com/activity-log/{site}?group=rewind
There is no facility for queuing a backup there.
Let's scope to displaying the last good backup / Jetpack Connection health. I can add enhancement issues for adding the explicit backup request, and a warning to this section without a recent backup or good Jetpack Connection
Here's a mock of how to introduce displaying the last good backup鈥攁 new card labeled Site backup
Site backup card:
Buton links to the activity log, where if I'm reading "I can add enhancement issues for adding the explicit backup request" correctly, they should have a way to initiate a backup once the enhancement issue is worked on. If not, and we're doing it within the SFTP/MySQL page, the button should start the backup.
In page:
Note that the button for "Backup your site now" is out of scope for this issue.
D34701-code, which should ship today, adds a last_good_backup (a unix timestamp) field to the state endpoint GET /wpcom/v2/sites/
/rewind.
Update on this. We added a new endpoint instead that lists the last 10 backups along with status:
GET /wpcom/v2/sites/<site_id>/rewind/backups
Source & docs linked from here (first endpoint): Pa0RFL-ct-p2.
as discussed in Slack, I think we should be changing the copy around rewind on the hosting page, in order to proactively manage user expectations of Rewind.
Presently we do explain that rewind can lead to lost content, for example if a post is published and a user rewinds to before the post was published, the post is lost.
This is great, except the user only sees it after they've encountered a situation where they need to rewind.
If we added similar copy on the Hosting page this would hopefully ensure that since SFTP and DB are what I would define as risky actions, that users think twice before diving straight in.
It would also help ensure Happiness has the option to address pushback if a user claims "no one warned me things would be missing if I broke my site"
A few suggestions for this card:
@jeraldjuice not sure about the status of this, but you might need some of the layout changes added in #37777
Most helpful comment
Note that the button for "Backup your site now" is out of scope for this issue.