backup

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package backup keeps a copy of a file the loop is about to change, and of the plugin stores beside a copy of the store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(path string, raw []byte, stamp string) (string, error)

File writes raw to <path>.loop-<stamp>.bak, or the first free name after it, and returns the name.

func PluginStores added in v0.3.0

func PluginStores(stateDir, backup string) error

PluginStores copies the store of each plugin under <stateDir>/plugins into PluginsOf(backup). The plugins must not be running: the copy is file by file.

func PluginsOf added in v0.3.0

func PluginsOf(backup string) string

PluginsOf is the directory beside the store backup at backup that holds the plugin stores taken with it.

func RestorePluginStores added in v0.3.0

func RestorePluginStores(backup, stateDir string) error

RestorePluginStores puts back the plugin stores taken with the store backup at backup, removing every store under <stateDir>/plugins that the backup did not hold: a plugin's store follows the core store it sits beside. The plugins must not be running.

Types

This section is empty.

Jump to

Keyboard shortcuts

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