Backup_Management - nairraf/x4SaveManager GitHub Wiki

Back to Documentation Contents

Interacting with Backups

  • Left Click a backup to select it. You can use the Ctrl and Shift keys to select multiple backups at a time
  • Right click to see the backup action menu:

backup right click

  • edit: opens the edit backup window. You must only have a single backup selected for this action to work.

  • Set Flag: Sets the flag on all selected backups Unset Flag: Removes the flag on all selected backups

  • Mark for Deletion: marks all selected backups for deletion. backups that are marked for deletion are only visible in the RECYCLE BIN.

  • Unmark for Deletion: removes the deletion mark on selected backups. When you remove the deleted mark, the backups will be visible in the appropriate playthrough.

  • Display Branch: display a specific branch, or all branches for the currently selected playthrough

  • Set Branch: Sets the branch on all currently selected backups

  • Restore Selected Backup to X4 Slot: Only works with a single selected backup. Restores the currently selected backup to the specified X4 save slot.

Editing a backup

Double clicking on a specific backup, or right clicking the selected backup and choosing edit will open up the edit backup window. You can use this window to edit the details for a specific backup:

edit backup

  1. view/change the playthrough that this backup is associated with
  2. view/change the branch this backup should be associated with
    • branches are a way to organize your backups for that playthrough. You can use branches to easily associate backups with in-game decisions.
    • to create a new branch, just type in a new branch name, which can be anything you want.
  3. set/unset the flag for this backup
    • think of the flag as an importance flag. Backups with their flag set will never be deleted.
  4. Mark/Unmark this backup for deletion
    • this does not immediately delete the backup. It simply marks the backup for deletion. It will only be viewable from the RECYCLE BIN
  5. edit the notes for this backup
  6. save your modifications.

use the close button, or the "X" in the top right to close the backup window.

Bulk Operations

While you can edit one backup at a time, there will be times where you will want to perform bulk operations. x4SaveManager allow the following bulk operations:

  • Set/Unset the backup flag
  • Mark/Unmark backups for deletion
  • Set a new branch
  • Move backups between playthroughs

To use these bulk operations, simply select multiple backups by CTRL and SHIFT clicking, and then use the right click menu to choose the appropriate bulk operation:

backup right click

  • Set Flag: Sets the flag on all selected backups

  • Unset Flag: Removes the flag on all selected backups

  • Mark for Deletion: marks all selected backups for deletion. backups that are marked for deletion are only visible in the RECYCLE BIN.

  • Unmark for Deletion: removes the deletion mark on selected backups. When you remove the deleted mark, the backups will be visible in the appropriate playthrough.

  • Set Branch: Sets the branch on all currently selected backups

Branches

You can create unlimited branches, and associate backups with branches. This allows you to track the in-game decisions you make. You can also choose to view backups for all branches, or just a single branch using the "Display Branch" option of the right click pop-up menu:

display branch

You can track which branch is currently displayed on the bottom right status bar menu:

branch filter

as you select different branches to display, this will update accordingly.

Changing to a new playthrough will reset the branch filter to "All", which displays the backups for all branches.

Restoring a backup

To restore a backup, right click on a selected backup and choose the option "Restore Selected Backup to X4 Slot"

restore backup

All the save slots correspond to the in-game slots as follows:

  • Quicksave
    • Quicksave in the X4 Load Game screen
  • Save 1 through 10
    • Slots 1 through 10 in the X4 Load Game screen

Once you select an appropriate slot to restore to, you will be presented with a confirmation dialog:

restore confirmation

Selecting Yes will proceed with the restore, and it will overwrite that X4 save slot with the selected backup.

Deleting/Pruning backups.

In order to mark a backup for deletion, the appropriate "Delete * Save Backups" setting in the Backp Settings window must be enabled:

delete settings

if you never want to delete any backup for a certain save type, just make sure that that save type is not checked.

  • Quik Save backups
    • these are the in-game backups taken with F5, which then X4 Foundations overwrites the "quicksave.xml.gz" save file
  • Auto Save backups:
    • these are the backups that X4 Foundations takes for you automatically, and stores them in the autosave_###.xml.gz save files
  • Normal Save Backups:
    • These are the in-game saves that you associate to the 1 through 10 slots, and X4 Foundations saves in the corresponding save_001.xml.gz through save_010.xml.gz files

Once you have the types of saves you are willing to delete the backups for, then to mark a save for deletion, simply use the right click context menu to mark the selected backups for deletion.

Once the backups are marked, they will no longer be visible in the playthrough's backup list, and they will only be visible in the recycle bin.

If you want to permanently delete all marked files in the recycle bin, choose the "Delete Marked Backups" option in the Backup menu:

delete backup

You will prompted for confirmation that you wish to delete all backups that are marked for deletion (visible in the recycle bin):

delete backup confirmation

selecting Yes will perminently delete all backups.

WARNING: this option is perminent, and once deleted, the backups will no longer be recoverable.

auto pruning backups

If you want x4SaveManager to auto-prune your backups, that is to say automatically mark certain backups for deletion, then enable the "Prune Backups at Application Startup" check box in the Backup Settings screen.

You will also need to set the corresponding "Delete * Save Backups" to control which types of backups can be candidates for deletion.

Double check the "Old Backups (days)" and "Never Prune the last backups" options to further control which backups will be candidates for deletion.

  • Old Backups (days): only backups older than this setting will be candidates for deletion
  • Never prune the last backups: backups are ordered by original save time, and this number of the most recent backups are kept and are never candidates for deletion.

X4 Save Slot to Backup Mapping

Once you start taking backups, you may want to see which X4 save slots are associated with which backups. You may start asking this question when it comes time to restoring backups over X4 Save Slots.

Because the restore process is a desctructive process, meaning that it will overwrite an X4 Save Slot, you may want to double check to make sure that the save slot in question does have a corresponding backup.

You can also use the the save slot to backup mapping window to remind yourself of which slot you want to play when you are in the X4 load game window.

All the save slots correspond to the in-game slots as follows:

  • autosave 1 to 3
    • autosave_001.xml.gz, autosave_002.xml.gz, autosave_003.xml.gz
  • Quicksave
    • quicksave.xml.gz
  • slots 1 through 10
    • save_001.xml.gz through save_010.xml.gz

To see a mapping between X4 Save Slots and their corresponing backups, select "X4 Save Backup Mapping" from the Backup Menu:

x4 save backup mapping

This will open the Save to Backup mapping window:

save to backup mapping window

  • it may take a few seconds to perform the save to backup mapping.
  • this is useful to see if there are any X4 saves that haven't been backed up yet and also show you which backup is currenlty in which X4 save slot, so you can decide which slots to safely overwrite when restoring backups to X4 save slots.

Import and Re-Index Backups

If the SQLite database is somehow deleted or damaged, or you just want to move x4SaveManager to a new computer, as long as you have all your backups, you can import and re-index all existing backups.

Just make sure that you have the correct Database Path, and Backup Path configured in the Settings window, and then from the Backup menu, select the "Import and Re-Index old backups" option:

import backups

You will be prompte to confirm the operation:

import backups confirmation

Selecting yes will continue with the import and re-index. It will take x4SaveManager some time to open and re-index all the backups.

The backups will be imported into the playthrough with the same playthrough ID if found, otherwise they will be marked for deletion and will be visible in the recycle bin.

Once in the recycle bin, you can simple create a new playthrough, move the backup to a new playthrough using the right click context menu, and then unmark the backups for deletion, and they will be displayed under the chosen playthrough.

From there you can create any branches to re-create your desired backup structure.

Back to Documentation Contents