Store Beat Saber backups in adjacent repo
This commit is contained in:
@@ -44,8 +44,8 @@ Install assets are currently expected to already exist locally, usually under:
|
||||
## Beat Saber Data Backups
|
||||
|
||||
`backup-userdata` copies the mounted Windows `UserData` folder and Beat Saber
|
||||
Windows app data into this repo. With the Windows mount at `~/Windows`, the
|
||||
helper infers Beat Saber's Windows app data as:
|
||||
Windows app data into the adjacent `../backups` repo. With the Windows mount at
|
||||
`~/Windows`, the helper infers Beat Saber's Windows app data as:
|
||||
|
||||
```text
|
||||
/home/pleb/Windows/Users/pleb/AppData/LocalLow/Hyperbolic Magnetism/Beat Saber
|
||||
@@ -60,12 +60,13 @@ PYTHONPATH=src python -m plugin_helper \
|
||||
--instance 1.44.1
|
||||
```
|
||||
|
||||
By default the repo receives plain copied files under `backups/beat-saber/UserData`
|
||||
and `backups/beat-saber/AppData`, plus `backups/beat-saber/backup-descriptor.json`
|
||||
describing the source paths from the latest backup run. Use
|
||||
By default the backup repo receives plain copied files under
|
||||
`../backups/beat-saber/UserData` and `../backups/beat-saber/AppData`, plus
|
||||
`../backups/beat-saber/backup-descriptor.json` describing the source paths from
|
||||
the latest backup run. Use
|
||||
`--appdata-path <path>` if the Windows profile path ever differs, `--no-appdata`
|
||||
for a `UserData`-only sync, or `--backup-root <path>` to choose a different
|
||||
repo-local destination.
|
||||
destination.
|
||||
|
||||
The backup intentionally omits bulky/generated data:
|
||||
|
||||
|
||||
@@ -238,11 +238,11 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
|
||||
backup = subcommands.add_parser(
|
||||
"backup-userdata",
|
||||
help="Copy UserData and Windows AppData into this repo",
|
||||
help="Copy UserData and Windows AppData into the adjacent backups repo",
|
||||
parents=[_common_parent()],
|
||||
)
|
||||
backup.add_argument("--instance", required=True)
|
||||
backup.add_argument("--backup-root", default="backups/beat-saber", help="Repo-local backup directory")
|
||||
backup.add_argument("--backup-root", default="../backups/beat-saber", help="Backup directory")
|
||||
backup.add_argument("--appdata-path", help="Override Beat Saber Windows AppData path")
|
||||
backup.add_argument("--no-appdata", action="store_true", help="Only copy UserData")
|
||||
|
||||
@@ -560,7 +560,7 @@ def run(argv: list[str] | None = None) -> int:
|
||||
root = repo_root()
|
||||
backup_root = Path(args.backup_root).expanduser()
|
||||
if not backup_root.is_absolute():
|
||||
backup_root = root / backup_root
|
||||
backup_root = (root / backup_root).resolve()
|
||||
result = sync_windows_data_repo(
|
||||
instance=args.instance,
|
||||
instance_path=instance.path,
|
||||
|
||||
Reference in New Issue
Block a user