top

Package backups contains all the stand-alone backup-related functionality for juju state. That functionality is encapsulated by the backups.Backups type. The package also exposes a few key helpers and components.

Backups are not a part of juju state nor of normal state operations. However, they certainly are tightly coupled with state (the very subject of backups). This puts backups in an odd position, particularly with regard to the storage of backup metadata and archives.

As noted above backups are about state but not a part of state. So exposing backup-related methods on State would imply the wrong thing. Thus most of the functionality here is defined at a high level without relation to state. A few low-level parts or helpers are exposed as functions to which you pass a state value. Those are kept to a minimum.

Note that state (and juju as a whole) currently does not have a persistence layer abstraction to facilitate separating different persistence needs and implementations. As a consequence, state's data, whether about how an environment should look or about existing resources within an environment, is dumped essentially straight into State's mongo connection. The code in the state package does not make any distinction between the two (nor does the package clearly distinguish between state-related abstractions and state-related data).

Backups add yet another category, merely taking advantage of State's mongo for storage. In the interest of making the distinction clear, among other reasons, backups uses its own database under state's mongo connection.

Imports 21 package(s)

  1. github.com/juju/utils/hash
  2. github.com/juju/juju/instance
  3. github.com/juju/juju/state/imagestorage
  4. github.com/juju/utils/set
  5. gopkg.in/mgo.v2
  6. github.com/juju/juju/network
  7. github.com/juju/juju/utils
  8. github.com/juju/txn
  9. github.com/juju/juju/juju/paths
  10. github.com/juju/utils/filestorage
  11. github.com/juju/juju/mongo
  12. github.com/juju/juju/version
  13. gopkg.in/mgo.v2/txn
  14. github.com/juju/juju/agent
  15. github.com/juju/loggo
  16. github.com/juju/errors
  17. github.com/juju/utils/tar
  18. github.com/juju/blobstore
  19. gopkg.in/mgo.v2/bson
  20. github.com/juju/juju/state
  21. github.com/juju/names

Test imports 7 package(s)

  1. github.com/juju/testing
  2. gopkg.in/check.v1
  3. github.com/juju/juju/state/testing
  4. github.com/juju/testing/checkers
  5. github.com/juju/juju/testing
  6. github.com/juju/juju/state/backups/testing
  7. github.com/juju/juju/state/backups