save data-container
#
OverviewSaving a data container creates a new revision for that data container. To save a data container use the save
command. Revisions are necessary for operations like reset
, graduate
and load
.
#
Command#
TutorialIn this tutorial we will create a data image, then create a data container from that image. We will then make some changes to the data-container and finally save those changes.
As a prerequisite you should've followed the instructions to install spawnctl
Create a file
development.yaml
with your data image specifications.In this case we want to create a PostgreSQL data image that is completely empty and is named
dev
.Run the following command to create a data image.
You can verify your data image by running the following command.
Create a data container from the newly created data image.
You can verify your data container was properly created by running the following command.
Notice the created data container has revision
rev.0
.You should now be able to connect to your database and execute queries.
In this example we connect to the PostgreSQL data container (database) using psql.
We can now perform a save operation on this data container.
You can also verify that a new revision was created by running the following command.
In this case the revision changed from
rev.0
torev.1
.