Wp-calypso: Hosting: Add visibility of last full site backup and Jetpack Connection Health [2]

Created on 1 Nov 2019  路  11Comments  路  Source: Automattic/wp-calypso

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:
Screen Shot 2019-11-14 at 6 47 23 PM

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:
Screen Shot 2019-11-14 at 6 47 32 PM

cc @singerb for technical feasibility

cc @apeatling @shaunandrews @olaolusoga

[Type] Task

Most helpful comment

Note that the button for "Backup your site now" is out of scope for this issue.

All 11 comments

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:
Screen Shot 2019-11-14 at 6 47 23 PM

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:
Screen Shot 2019-11-14 at 6 47 32 PM

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.
image

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:

  • Change the hierarchy a bit so the warning doesn't get lost.
  • We don't need the header and the subheader here, so just lead with the impactful info
  • I have a little lightbulb here, but I'm sure that's not kosher for the design system. Is there some other icon we can use that implies ATTN or NOTE! or HEADS UP! @olaolusoga

last backup

@jeraldjuice not sure about the status of this, but you might need some of the layout changes added in #37777

Was this page helpful?
0 / 5 - 0 ratings