ludusavi

repository·master·Indexed 26 days ago

https://github.com/mtkennerly/ludusavi

A high-performance, cross-platform game save backup tool written in Rust. It supports over 19,000 games across storefronts including Steam, GOG, and Epic, and is compatible with Steam Deck. Ludusavi provides both a GUI and a CLI for manual use or automation, featuring capabilities such as cloud synchronization, Windows registry save support, and a 'wrap' command to automate backup/restore cycles around game execution.

Tokens
16.8K
Snippets
36
Records
133
Agent score
88%

What's inside ludusavi

  1. Overview of Ludusavi features

    master

    Ludusavi is a cross-platform tool written in Rust designed to back up video game save data.

    Key Capabilities:

    • Extensive Support: Backs up data for over 19,000 games, including custom entries.
    • Multi-Store Support: Works with Steam, GOG, Epic, Heroic, Lutris, and more.
    • Flexible Interfaces: Provides both a Graphical User Interface (GUI) and a Command Line Interface (CLI) for scripting.
    • Advanced Save Detection: Supports files, Windows registry saves, Proton saves (Steam), and Steam screenshots.
    • Steam Deck Compatibility: Fully functional on the Steam Deck.
    • Playnite Integration: Available as a Playnite extension.

    Ludusavi uses the Ludusavi Manifest to identify backup paths for games, with data primarily sourced from PCGamingWiki.

  2. Configure cloud-supported game exclusions

    master

    Ludusavi can automatically skip games that support cloud saves on specific stores (e.g., Steam). This is useful for avoiding redundant backups of files already managed by a cloud service.

    • Configuration Location: Use the "other" screen in the Ludusavi interface.
    • Behavior: If cloud exclusions are enabled for a store (like Steam), Ludusavi will skip games that have cloud metadata in their manifest. This applies even if the game was installed via a different launcher (e.g., Heroic), as the metadata is tied to the game itself.
    • Note on First-Time Backups: If a game has cloud metadata and cloud exclusions are enabled, it may not appear in a full backup preview if it has no previous Ludusavi backup. You can still back up these games explicitly via the CLI.
  3. Locate Ludusavi configuration and log directories

    master

    Ludusavi stores its configuration, logs, and other data in platform-specific directories. Use these paths to find your settings or logs:

    • Windows: %APPDATA%/ludusavi
    • Linux: $XDG_CONFIG_HOME/ludusavi or ~/.config/ludusavi (Note: If using Flatpak, the path is ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi)
    • macOS: ~/Library/Application Support/ludusavi
  4. Create custom game save definitions

    master

    You can define custom game save locations via the custom games screen in Ludusavi. If the game name you provide exactly matches an existing known game, your custom definition will override the default one.

    When defining paths:

    • Use the browse button to select folders quickly.
    • For specific files, use the browse button to select the parent folder and then manually type the filename.
    • You can use globs (e.g., C:/example/*.txt) to select multiple files.
    • You can use placeholders defined in the Ludusavi Manifest format.
    • To escape special glob characters in folder names, wrap the character in brackets (e.g., [ becomes [[]).
  5. Set environment variables on Windows

    master

    To set the environment variables mentioned in the troubleshooting guides on Windows:

    1. Open the Start Menu.
    2. Search for edit the system environment variables and select the result.
    3. Click the environment variables... button.
    4. In the User variables section, click new... to add a variable name and value, or select an existing one and click edit....
  6. Configure Lutris to wrap game launches

    master

    You can configure Ludusavi globally for all games in Lutris (system installations only; not Flatpak).

    Via Lutris GUI

    1. Open the Global options tab in the Preferences menu.
    2. Enable Advanced in the top-right corner.
    3. Scroll to the Game execution section.
    4. In the Command prefix entry, enter: ludusavi wrap --infer lutris --gui -- (If ludusavi is not in your PATH, use the full path to the executable).
    5. Click Save.

    Via Configuration File

    Alternatively, add the following to your ~/.local/share/lutris/system.yml file:

    system:
      prefix_command: 'ludusavi wrap --infer lutris --gui --'
    ludusavi wrap --infer lutris --gui --
  7. Understand backup retention logic and examples

    master

    Ludusavi follows a hierarchical retention pattern. If you set a limit for both full and differential backups, Ludusavi maintains a specific number of differential backups for each full backup.

    Example Configuration: 2 Full and 2 Differential Ludusavi will maintain a structure like this:

    • Backup #1: full
      • Backup #2: differential
      • Backup #3: differential
    • Backup #4: full
      • Backup #5: differential
      • Backup #6: differential

    When Backup #7 is created, Ludusavi will delete backups #1, #2, and #3 to satisfy the limit of 2 full backups.

    Example Configuration: 1 Full and 1+ Differential If full retention is set to 1 and differential retention is 1+, Ludusavi will keep the single full backup and only delete the oldest differential backups as new ones are created.

  8. Install Ludusavi via Cargo (Rust)

    master

    If you have the Rust toolchain installed, you can install or update Ludusavi using Cargo.

    Linux Dependencies: On Linux, installing via Cargo requires the following system packages (or their equivalents for your distribution): gcc, cmake, libx11-dev, libxcb-composite0-dev, libfreetype6-dev, libexpat1-dev, libfontconfig1-dev, and libgtk-3-dev.

    cargo install --locked ludusavi