Skip to main content

Database

  • Create database

    Use command :

    initz create dataservice --name=<name> --type=<type> --mode=<mode> --replicas=<replicas> --size=<size> --storage=<storage> --backupschedule=<backup-schedule>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
    --type
    • Indicates the type of the database.
    • Possible values : mongoDB/postgresql/redis/qdrant
    • required
    --mode
    • Indicates the runtype (prod/non-prod).
    • Optional
    • Default : prod
    --replicas
    • Indicates the number of replicas (1/3/5).
    • Optional
    • Default : 1
    --size
    • Indicates the size of the database.(Small-1GB RAM | 0.5 vCPU/Default-1GB RAM | 1 vCPU/Large-4GB RAM | 2 vCPU )
    • Optional
    • Default : Small
    --storage
    • Indicates the storage of the database.(20 to 500).
    • Optional
    • Default : 20
    --backupschedule
    • Indicates the backup schedule
    • Optional
    • Default : daily
    • Possible values : daily/weekly/monthly
  • Update database

    initz edit dataservice --name=<database-name> --replicas=<replicas> --storage=<storage> --size=<size>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
    --replicas
    • Indicates the number of replicas (1/3/5).
    • Optional
    • Default : 1
    --size
    • Indicates the size of the database.(Small-1GB RAM | 0.5 vCPU/Default-1GB RAM | 1 vCPU/Large-4GB RAM | 2 vCPU )
    • Optional
    • Default : Small
    --storage
    • Indicates the storage of the database.(20 to 500).
    • Optional
    • Default : 20
  • Delete database

    Use command :

    initz delete dataservice --name <name>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
  • Get list of snapshots

    Use command :

    initz get snapshot --name <dataservice-name>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
  • Snapshot Restoration

    Use command :

    initz restore --name <dataservice-name> --snapshot <snapshot-name> 
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
    --snapshot
    • Indicates the name of the snapshot that needs to be restored.
    • required
    • To get the Snapshot Name Refer :
      initz get snapshot --name <dataservice-name>
  • How to get list of databases

    Use command :

    initz get databases
  • Describe a database

    Use command :

    initz describe dataservice --name <name>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
  • Download CA certifiacte

    Use command :

    initz download cacrt --name <name>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n
    info
    • The CA certificate is available only for PostgreSQL and Redis.
  • Check database name

    To check data service name is available or not, use command :

    initz check dataservice --name <name>
    Flags
    --name
    • Indicates the name of the database.
    • required
    • Shorthand : n