• Manual
  • API Documentation

    Show / Hide Table of Contents
    • Introduction
    • Installation
    • Getting Started
    • Demos
    • The Save System API
    • Auto Save
    • Platforms
    • Security
    • Serialization
    • Supported Data Types
    • Migration
    • FAQ
    • Changelog
    • Extend
      • Overview
      • Converter
      • Encryption
      • Storage
    • Guides
      • Overview
      • Configuring Settings
      • Using Auto Save
      • Basic Saving and Loading
      • Saving and Loading Raw Data
      • Deleting the Data
      • Saving and Loading Images
      • Saving and Loading Scene Objects
      • Saving and Loading Assets
      • Saving and Loading Readonly Properties
    • Integrations
      • Overview
      • Google Play Games
      • Xbox Live
      • Bolt
      • Firebase
      • PlayFab
      • PlayMaker
      • Steam Auto-Cloud
      • Steamworks .NET
      • Facepunch Steamworks
      • Text Mesh Pro
    • Storage
      • Overview
      • Backup
      • Catalog
      • Meta Data
      • Built-in Storages
        • File
        • PlayerPrefs
        • Memory
      • Third-party Storages
        • Firebase
          • Realtime Database
          • Cloud Storage
          • Firestore
        • PlayFab
          • Entity Objects
          • Entity Files
          • User Data
        • Steam
          • Steamworks .NET
          • Facepunch Steamworks
        • Google Play
          • Saved Game
        • Xbox Live
          • Connected Storage

    Backup the Data

    You can create a new backup from the saved data by using the SaveSystemAPI.CreateBackupAsync and then restore the latest backup by calling the SaveSystemAPI.RestoreLatestBackupAsync method or restore a specific backup by using the SaveSystemAPI.RestoreBackupAsync.

    Learn more about the Backup feature >

    Creating and Restoring a Backup

    async void Start() {
    
        // The identifier of the saved data to create a backup for.
        string identifier = "name.json";
    
        // A sample data to demonstrate the before / after of restoring a backup
        string data = "The sample data";
    
        // Saving a sample data
        await SaveSystemAPI.SaveAsync(identifier, data);
    
        // Create a new backup
        await SaveSystemAPI.CreateBackupAsync(identifier);
    
        // Modifying the data and saving it again to have a different version than of the backup
        data = "New Data!";
        await SaveSystemAPI.SaveAsync(identifier, data);
    
        // And then restore the backup
        await SaveSystemAPI.RestoreLatestBackupAsync(identifier);
    
        // Now, load the data to see the result
        data = await SaveSystemAPI.LoadAsync<string>(identifier);
    
        Debug.Log(data); // Outputs "The sample data"
    }
    
    • Improve this Doc
    • 0 Comments
    In This Article
    • Creating and Restoring a Backup