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

Test imports 7 package(s)

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