Table of Contents

Overview


Playnite allows you to configure automatic backups for safety. These backups can be used to restore Playnite to a previous state in case of installation issues, library corruption, or when moving a library to another PC.

Note

Playnite can create and restore backups only during application startup. This means that manual backup/restore requires Playnite to be restarted and automatic backup can be currently done only on application startup.

This also means that external backup/restore, started via command line, will restart existing Playnite instance.

Automatic backups

Automatic backups can be configured in application settings under Backup section (by default disabled). These backup are currently only possible on application startup and can be configured to be run daily or weekly.

Backups Support

If you need more granular control over when and how backups are started, see starting backups externally section.

Manual backups

Backups can be manually created or restored under Main menu -> Library or via commands from the keyboard launcher.

Creating and Restoring Backups

Backup items

Item Config value Description
Settings 0 Playnite configuration files, specifically config.json and fullscreenConfig.json.
Library 1 Core game library files (list of games and other files), excluding game media files (covers, icons etc.).
Library files 2 Game library media, covers, backgrounds etc.
Extensions 3 Installed extensions.
Themes 4 Installed themes.
Extensions data 5 Extension user data generated by installed extensions.

Starting backups externally

Data backup and data restore can be started externally via --backup and --restorebackup command line arguments. These arguments take full path to a configuration file as an argument. The actual procedure is controlled via settings from the configuration file.

Backup properties

Property Description
DataDir Full path to a folder containing Playnite user data.
LibraryDir Full path to a folder containing Playnite game library files.
OutputFile Full path to resulting backup file.
OutputDir Full path to output folder. Playnite will choose output file name automatically, one that matches rotating backup names.
BackupItems List of additional items (their integer values) to be included in a backup. Settings and core game library files are always included.
ClosedWhenDone If set to true, Playnite will stay closed after backup procedure is finished.
CancelIfGameRunning If set to true, Playnite won't start backup procedure if a game is currently running existing Playnite instance.
RotatingBackups Number of rotating backup files to be kept. This only works if resulting file name is in PlayniteBackup-yyyy-MM-dd-HH-mm-ss.zip format. 0 means only one backup file will be always kept.

OutputFile and OutputDir are mutually exclusive. If both are specified, OutputDir will be used and resulting file name will be automatically generated.

Example

Playnite.DesktopApp.exe --backup "c:\test\backup_config.json"
{
    "DataDir": "c:\\Users\\user\\AppData\\Roaming\\Playnite\\",
    "LibraryDir": "c:\\Users\\user\\AppData\\Roaming\\Playnite\\library",
    "OutputFile": "d:\\backups\\PlayniteBackup-2022-07-05-10-23-57.zip",
    "BackupItems": [
        2,
        3,
        4,
        5
    ],
    "ClosedWhenDone": true,
    "CancelIfGameRunning": true,
    "RotatingBackups": 5
}

Restore properties

Property Description
BackupFile Full path to a backup file.
DataDir Full path folder where user data should be restored.
LibraryDir Full path to folder where game library data should be restored.
RestoreItems List of items (their integer values) to be restore from backup files.
ClosedWhenDone If set to true, Playnite will stay closed after restore procedure is finished.
CancelIfGameRunning If set to true Playnite won't start restore procedure if a game is currently running existing Playnite instance.
RestoreLibrarySettingsPath Settings value path for game library folder to be applied after restoring application settings. Useful in cases where you are recovering backup from installation that points to a different game library folder (for example installed vs portable installations). If empty, path saved in the backup will be used.

Example

Playnite.DesktopApp.exe --restorebackup "c:\test\restore_config.json"
{
    "BackupFile": "d:\\backups\\PlayniteBackup-2022-07-05-10-23-57.zip",
    "DataDir": "c:\\Users\\user\\AppData\\Roaming\\Playnite\\",
    "LibraryDir": "c:\\Users\\user\\AppData\\Roaming\\Playnite\\library",
    "RestoreItems": [
        0,
        1,
        2,
        3,
        4,
        5
    ],
    "ClosedWhenDone": true,
    "CancelIfGameRunning": true
}