OpenSimulator · EN

FSAssets: backup, restore and integrity

Consistent backups of payloads, SQL metadata and spool, with validation and recovery.

Guide grounded in the OpenSimulator 0.9.3.1 / .NET 8 fork. Verify your version and back up before changing a live installation.

Do not back up only data

FSAssets depends on BaseDirectory files, SQL metadata and SpoolDirectory. Ignoring spool can lose recent writes; files without SQL metadata do not guarantee UUID-based retrieval. Include INIs and ROBUST service configuration.

Choose a consistent point in time

The easiest method to reason about is a planned backup after controlled write shutdown: stop writing simulators and ROBUST, then capture files and database together. To shorten the pause, run an online rsync pre-copy first, then freeze writes, complete the final pass and back up SQL during the same no-write window. Strictly zero-pause backups require coordinated, tested snapshots, not unrelated captures taken at different times.

SQL backup: account and scope

Identify the actual database and Realm table (fsassets by default). A grid generally has many other tables and services; dumping just fsassets is not a full-grid backup. Use safe SQL client credential handling instead of exposing passwords on command lines.

Adapt this example: never run blindly in production.

# Exemple MySQL : adapter le nom de la base et les identifiants
mysqldump --single-transaction --routines --triggers --events --databases opensim > /backup/opensim.sql
# Pour une restauration complète : conserver aussi configs, assets et versions.

Copy payloads and spool

After a controlled stop, copy data and tmp to a destination with sufficient free bytes and inodes. Preserve ownership, permissions, symlinks and timestamps. A successful rsync exit status is not enough: verify files, sizes and sample restores.

Adapt this example: never run blindly in production.

sudo rsync -aHAX --numeric-ids /srv/opensim/fsassets/data/ /backup/fsassets/data/
sudo rsync -aHAX --numeric-ids /srv/opensim/fsassets/tmp/ /backup/fsassets/tmp/
df -h /backup/fsassets
df -i /backup/fsassets

Validate backups and files

Check the dump result, job logs, metadata row count, a .gz sample using gzip -t, and presence of selected UUIDs in SQL. Checking millions of payloads is expensive; schedule heavy validation outside peak traffic.

Adapt this example: never run blindly in production.

# Choisir un chemin .gz réel, ne pas modifier les assets :
gzip -t /srv/opensim/fsassets/data/CHEMIN/HASH.gz
# Interroger la base réelle ; Realm peut différer de fsassets :
SELECT COUNT(*) FROM fsassets;

Restore into a staging instance

First restore SQL dump and files into an isolated environment with the same connector version and UseOsgridFormat. Check known UUIDs with show digest, then viewer login and asset rendering. Do not start two FSAssets writers on the same tree without an explicitly validated multi-instance design.

Retention, off-site copies and drills

Keep several restore points, with at least one copy away from the production host. A dedicated FSAssets disk is not a backup. Define realistic RPO/RTO and regularly test complete restores including recent spool writes.

Never blindly delete apparent orphan files

Deduplication means a single hash can be referenced by multiple UUIDs. Deleting an apparently unused file can break multiple assets. delete asset and force import modify or overwrite data; cleanup requires a complete SQL/file reference analysis.

Hot backup procedure: detailed rsync examples

The low-priority pre-copy, screen, --dry-run, final SQL/file synchronization and rollback practices are detailed in the dedicated chapter to avoid duplicating the procedure.

Read the hot-backup guide

Further reading

Verifiable sources