lxd/cluster/gateway.go
func (g *Gateway) Sync() {
	if g.server == nil {
		return
	}

	dir := filepath.Join(g.db.Dir(), "global")
	err := g.server.Dump("db.bin", dir)
	if err != nil {
		// Just log a warning, since this is not fatal.
		logger.Warnf("Failed to dump database to disk: %v", err)
	}
}
func (g *Gateway) Sync() {
	if g.server == nil {
		return
	}

	dir := filepath.Join(g.db.Dir(), "global")
	err := g.server.Dump("db.bin", dir)
	if err != nil {
		// Just log a warning, since this is not fatal.
		logger.Warnf("Failed to dump database to disk: %v", err)
	}
}
// Sync dumps the content of the database to disk. This is useful for
// inspection purposes, and it's also needed by the activateifneeded command so
// it can inspect the database in order to decide whether to activate the
// daemon or not.