Code Saver: User Guide

Follow

Use the Code Saver app to automatically back up your Hubs' Custom Code blocks, and to quickly restore from your backups at any time.


 

Before you begin

  • To use Code Saver, your Uberflip account must have API access. This feature is included with certain pack types, or may be added on to your Uberflip subscription. For more information, please speak with your Uberflip account representative.
  • To follow the instructions in this article, you must be a member of the Account Administrators user group in the Uberflip account where you are using Code Saver.
    • After installing the Code Saver Marketplace app, you can also add the Code Saver > View Code Saver App permission to any user or user group to allow them to access Code Saver.

 

About Code Saver

Code Saver is a utility for backing up and restoring Custom Code in your Uberflip Hubs. With Code Saver, you can:

  • Automatically back up the code in Custom Code blocks from your Hubs to a secure GitHub repository every 24 hours
  • Browse all individual Code Block backups, view the code that was backed up, and restore any backup of your choice to your Hub with just a few clicks

Code Saver is designed to help you recover from situations where you have accidentally broken your Hub's Custom Code, such as if you unintentionally delete a Custom Code block, or make changes that render the code non-functional. If this happens, you can use Code Saver to restore an earlier, working version of the affected Custom Code block to bring your Hub back to full functionality.

 

Install Code Saver

To use Code Saver, you must first install the Code Saver Marketplace app.

  1. Log in to your Uberflip account at app.uberflip.com.
  2. Go to the Code Saver listing page in Uberflip Marketplace.
  3. Click on Install.
  4. If the app has been successfully installed, you'll see Code Saver listed under Marketplace > Installed Apps in Uberflip:
    image.png
  5. In addition, you'll also see a new Code Saver menu option in the sidebar menu in Uberflip:
    image.png

 

Open Code Saver

To set up Code Saver to back up your Custom Code, and to restore it, open up the app from within Uberflip.

  1. Log in to your Uberflip account at app.uberflip.com.
  2. Click on Code Saver in the sidebar menu:
    image.png
  3. You will be logged in to Code Saver automatically, and the Code Saver app interface will appear on the right.

Info

Code Saver accesses your account using your Uberflip API credentials. If you have not yet generated API credentials for your user account, Code Saver will automatically generate these for you the first time you open the app.

Enable and manage Custom Code backups

Code Saver can back up Custom Code blocks within any Hubs connected to your Uberflip account. You can choose to turn on or pause backups for each of your Hubs individually.

Use Code Saver's Backup section to manage your Custom Code backups. This section is always displayed by default whenever you open Code Saver, and shows the current backup status of all Hubs within your account:

image.png

View backup status

Each Hub in your account is represented by its own tile in the Backup section, which displays its current backup status:

image.png

  1. Hub details: Indicates the name of the Hub (click to open the Hub), and the current number of Custom Code blocks in the Hub
  2. Backup status: Displays current backup status as Enabled or Paused.
  3. Last backup timestamp: Indicates the time and date when the last backup for this Hub was made

Enable Custom Code backups for a Hub

By default, backups for all Hubs are disabled (paused) when you first install Code Saver. To enable backups for a Hub, click on the toggle switch in the Hub's tile:

enablebackup.gif

  • You must enable backups for each Hub separately. Only Custom Code blocks located in Hubs where backup has been enabled will be backed up.
  • Enabling backups for a Hub will create a vault for that Hub, a secure GitHub repository dedicated to backups for that Hub only.
  • When you enable backups for a Hub in your account, Code Saver will begin automatically backing up all Custom Code blocks within that Hub once a day, at 11:45 PM Eastern Time. You can see a countdown to the next backup to the right of the Hub backup status tiles:

    image.png

  • If this is the first time you've enabled backups for a Hub, Code Saver will make a backup immediately.
  • If there are any previous backups for a Hub, Code Saver will make a backup at the next backup cycle (11:45 PM ET).

What gets backed up?

Code Saver will back up (and restore) the following elements of a Custom Code block:

  • The code itself (everything within the code editor field)
  • The block's placement setting
  • The description text

The Custom Code block's name will also be backed up, but will not be restored if the name of the block has changed since the backup was created.

Pause Custom Code backups for a Hub

You can pause backups for any Hub in your account at any time. When you do this (or if you simply don't enable backups for a Hub), Code Saver will skip that Hub during its daily backup cycle.

Important

Pausing backups for a hub will only stop further backups from being made, and will not delete any previously created backups.

  1. To pause backups for a Hub, click on the toggle switch in the Hub's tile again:

    image.png

  2. In the confirmation window, type Yes into the field, then click on the Pause button:
    image.png
  3. The toggle switch will change to the "paused" state, and Custom Code in the selected Hub will no longer be backed up:
    image.png

 

View and restore Custom Code backups

Code Saver will create backups of all Custom Code blocks in Hubs where backups are enabled. You can view backups for each Custom Code block individually, and restore a backup for any Custom Code block at any time.

Use Code Saver's Restore section to view available backups and restore selected backups. Available backups are organized by Hub, and the Restore section lists all Hubs for which backups are available:

image.png

View available backups

Click on a Hub in the Restore section to view available backups for that Hub:

image.png

This will show a list of all Custom Code blocks in the Hub. Use the Select Backup By Date dropdown under any Custom Code block to view available backups for that block:

image.png

Important

The dates and times shown indicate when the Custom Code block was last modified — not when the backup was made.

If a Custom Code block hasn't been changed since the last backup, Code Saver will skip backing it up until it detects another change has been made.

Select and view a backup

Click on a backup listed in the Select Backup By Date dropdown to select it. When you select a backup, a View Code button will appear:

image.png

Click the View Code button to see the code that was backed up (and which will be restored to your Hub, if you choose to restore this backup), along with its placement:

image.png

Info

This isn't just a preview — the View Code function shows all code that was backed up for the selected Custom Code block.

Restore a backup

You can restore a backup of any Custom Code block at any time. Restoring a backup will replace the current contents of the Custom Code block in the Hub with the code that was backed up, effectively returning the Custom Code block back to the same state when the backup was made.

Warning

Restoring a backup can NOT be undone! If the code that you replacing with the backup has not yet been backed up, you will not be able to recover it after the restore has been completed.

Always proceed with caution when restoring backups, and double-check that you are restoring the right backup for the right code block.

  1. To restore a backup, simply select the backup (using the Select Backup By Date dropdown), then click on the Restore button:

    image.png

  2. In the confirmation window, verify the Code Block name and backup are correct, then type the name of the Custom Code block into the field to confirm that you are sure you want to restore this backup:

    image.png

  3. Click on the Restore button to proceed. Code Saver will restore the selected backup and display a confirmation message:
    image.png
  4. At this point, the backed up code has been restored, but the Custom Code block has been disabled:
    • To enable the restored code (and allow it to take effect on your Hub right away), click on the Enable button.
    • If you want to verify the code before enabling it in the Hub manually, click on Cancel. You can check on the code in your Hub under Appearance > Custom Code.
  5. You're done!

 

View Code Saver activity logs

Code Saver maintains detailed logs of all activity (both activity the app performs itself, and activity which users perform in Code Saver).

Use Code Saver's Logs section to view detailed app activity logs. Logs are divided by Hub:

image.png

Click on a Hub to view relevant activity logs for that Hub. Logs will open in a new browser tab/window:

image.png

Each line the log represents a user action, a backup or restore event, or an automatic backup event. Each entry consists of:

  • Timestamp: The time/date (in Eastern Time) when the action or event occurred.
  • Type: The kind of entry, which can be any of info, warning, or error.
  • Message: A detailed description of the action or event that occurred.

 

Notes

  • Code Saver organizes and displays available backups under the names of the Custom Code blocks, but backups are actually associated with the unique ID of their Custom Code block. If you rename a Custom Code block in Uberflip, that name change will also be reflected in Code Saver, and all previous backups will be shown under the new name. If you restore a backup from before a Custom Code block was renamed, the Custom Code block will not be reverted to the previous name — only the code, placement, and description will be restored.
  • If you delete a Custom Code block that was previously backed up by Code Saver, those backups will still remain in Code Saver. When you restore a backup of a Custom Code block that has been deleted, Code Saver will recreate the Custom Code block in Uberflip, then restore the code within it. Code Saver will then also resume backing up the recreated Custom Code block (provided backups are enabled for the Hub).
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.