backup

package
v0.9.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupFilename

func BackupFilename() string

func CreateWorldBackup

func CreateWorldBackup() ([]byte, string, error)

CreateWorldBackup creates a tar.gz archive of the world data directory. The caller must hold the MUD lock during this call.

func Reschedule

func Reschedule()

Reschedule signals the backup scheduler to re-read the config and recalculate the next backup time immediately.

func RunBackup

func RunBackup() ([]byte, string, error)

RunBackup performs a full backup: broadcasts a warning to players, saves all data, locks the MUD, creates the archive, unlocks, and broadcasts completion. Returns the archive bytes, filename, and any error.

func StartScheduler

func StartScheduler()

StartScheduler starts the background goroutine that runs scheduled backups. It re-reads the config each cycle so schedule/destination changes take effect without a restart. Call Reschedule() after changing backup config to apply immediately.

func StopScheduler

func StopScheduler()

StopScheduler signals the backup scheduler goroutine to exit.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL