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

Test imports 7 package(s)

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