1. Registry
  2. Packages
  3. Dokploy
  4. API Docs
  5. Backup
Viewing docs for Dokploy v0.3.1
published on Tuesday, Sep 29, 2026 by dimeskigj
dokploy logo Dokploy
Viewing docs for Dokploy v0.3.1
published on Tuesday, Sep 29, 2026 by dimeskigj

    A scheduled Dokploy database backup. Exactly one of postgresId, mysqlId, mariadbId, or mongoId must be set.

    Create Backup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Backup(name: string, args: BackupArgs, opts?: CustomResourceOptions);
    @overload
    def Backup(resource_name: str,
               args: BackupArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Backup(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               database: Optional[str] = None,
               destination_id: Optional[str] = None,
               prefix: Optional[str] = None,
               schedule: Optional[str] = None,
               enabled: Optional[bool] = None,
               keep_latest_count: Optional[int] = None,
               mariadb_id: Optional[str] = None,
               mongo_id: Optional[str] = None,
               mysql_id: Optional[str] = None,
               postgres_id: Optional[str] = None)
    func NewBackup(ctx *Context, name string, args BackupArgs, opts ...ResourceOption) (*Backup, error)
    public Backup(string name, BackupArgs args, CustomResourceOptions? opts = null)
    public Backup(String name, BackupArgs args)
    public Backup(String name, BackupArgs args, CustomResourceOptions options)
    
    type: dokploy:Backup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dokploy_backup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BackupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var backupResource = new Dokploy.Backup("backupResource", new()
    {
        Database = "string",
        DestinationId = "string",
        Prefix = "string",
        Schedule = "string",
        Enabled = false,
        KeepLatestCount = 0,
        MariadbId = "string",
        MongoId = "string",
        MysqlId = "string",
        PostgresId = "string",
    });
    
    example, err := dokploy.NewBackup(ctx, "backupResource", &dokploy.BackupArgs{
    	Database:        pulumi.String("string"),
    	DestinationId:   pulumi.String("string"),
    	Prefix:          pulumi.String("string"),
    	Schedule:        pulumi.String("string"),
    	Enabled:         pulumi.Bool(false),
    	KeepLatestCount: pulumi.Int(0),
    	MariadbId:       pulumi.String("string"),
    	MongoId:         pulumi.String("string"),
    	MysqlId:         pulumi.String("string"),
    	PostgresId:      pulumi.String("string"),
    })
    
    resource "dokploy_backup" "backupResource" {
      pulumi {
        replace_on_changes = [mariadb_id, mongo_id, mysql_id, postgres_id]
      }
      lifecycle {
        create_before_destroy = true
      }
      database          = "string"
      destination_id    = "string"
      prefix            = "string"
      schedule          = "string"
      enabled           = false
      keep_latest_count = 0
      mariadb_id        = "string"
      mongo_id          = "string"
      mysql_id          = "string"
      postgres_id       = "string"
    }
    
    var backupResource = new Backup("backupResource", BackupArgs.builder()
        .database("string")
        .destinationId("string")
        .prefix("string")
        .schedule("string")
        .enabled(false)
        .keepLatestCount(0)
        .mariadbId("string")
        .mongoId("string")
        .mysqlId("string")
        .postgresId("string")
        .build());
    
    backup_resource = dokploy.Backup("backupResource",
        database="string",
        destination_id="string",
        prefix="string",
        schedule="string",
        enabled=False,
        keep_latest_count=0,
        mariadb_id="string",
        mongo_id="string",
        mysql_id="string",
        postgres_id="string")
    
    const backupResource = new dokploy.Backup("backupResource", {
        database: "string",
        destinationId: "string",
        prefix: "string",
        schedule: "string",
        enabled: false,
        keepLatestCount: 0,
        mariadbId: "string",
        mongoId: "string",
        mysqlId: "string",
        postgresId: "string",
    });
    
    type: dokploy:Backup
    properties:
        database: string
        destinationId: string
        enabled: false
        keepLatestCount: 0
        mariadbId: string
        mongoId: string
        mysqlId: string
        postgresId: string
        prefix: string
        schedule: string
    

    Backup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Backup resource accepts the following input properties:

    Database string
    The database name inside the target instance to back up.
    DestinationId string
    The destination ID backups are stored to.
    Prefix string
    The backup file prefix.
    Schedule string
    The backup cron schedule.
    Enabled bool
    Whether the backup schedule is enabled.
    KeepLatestCount int
    The optional number of most recent backups to retain.
    MariadbId string
    The target MariaDB ID.
    MongoId string
    The target MongoDB ID.
    MysqlId string
    The target MySQL ID.
    PostgresId string
    The target Postgres ID.
    Database string
    The database name inside the target instance to back up.
    DestinationId string
    The destination ID backups are stored to.
    Prefix string
    The backup file prefix.
    Schedule string
    The backup cron schedule.
    Enabled bool
    Whether the backup schedule is enabled.
    KeepLatestCount int
    The optional number of most recent backups to retain.
    MariadbId string
    The target MariaDB ID.
    MongoId string
    The target MongoDB ID.
    MysqlId string
    The target MySQL ID.
    PostgresId string
    The target Postgres ID.
    database string
    The database name inside the target instance to back up.
    destination_id string
    The destination ID backups are stored to.
    prefix string
    The backup file prefix.
    schedule string
    The backup cron schedule.
    enabled bool
    Whether the backup schedule is enabled.
    keep_latest_count number
    The optional number of most recent backups to retain.
    mariadb_id string
    The target MariaDB ID.
    mongo_id string
    The target MongoDB ID.
    mysql_id string
    The target MySQL ID.
    postgres_id string
    The target Postgres ID.
    database String
    The database name inside the target instance to back up.
    destinationId String
    The destination ID backups are stored to.
    prefix String
    The backup file prefix.
    schedule String
    The backup cron schedule.
    enabled Boolean
    Whether the backup schedule is enabled.
    keepLatestCount Integer
    The optional number of most recent backups to retain.
    mariadbId String
    The target MariaDB ID.
    mongoId String
    The target MongoDB ID.
    mysqlId String
    The target MySQL ID.
    postgresId String
    The target Postgres ID.
    database string
    The database name inside the target instance to back up.
    destinationId string
    The destination ID backups are stored to.
    prefix string
    The backup file prefix.
    schedule string
    The backup cron schedule.
    enabled boolean
    Whether the backup schedule is enabled.
    keepLatestCount number
    The optional number of most recent backups to retain.
    mariadbId string
    The target MariaDB ID.
    mongoId string
    The target MongoDB ID.
    mysqlId string
    The target MySQL ID.
    postgresId string
    The target Postgres ID.
    database str
    The database name inside the target instance to back up.
    destination_id str
    The destination ID backups are stored to.
    prefix str
    The backup file prefix.
    schedule str
    The backup cron schedule.
    enabled bool
    Whether the backup schedule is enabled.
    keep_latest_count int
    The optional number of most recent backups to retain.
    mariadb_id str
    The target MariaDB ID.
    mongo_id str
    The target MongoDB ID.
    mysql_id str
    The target MySQL ID.
    postgres_id str
    The target Postgres ID.
    database String
    The database name inside the target instance to back up.
    destinationId String
    The destination ID backups are stored to.
    prefix String
    The backup file prefix.
    schedule String
    The backup cron schedule.
    enabled Boolean
    Whether the backup schedule is enabled.
    keepLatestCount Number
    The optional number of most recent backups to retain.
    mariadbId String
    The target MariaDB ID.
    mongoId String
    The target MongoDB ID.
    mysqlId String
    The target MySQL ID.
    postgresId String
    The target Postgres ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Backup resource produces the following output properties:

    BackupId string
    The stable Dokploy backup ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    BackupId string
    The stable Dokploy backup ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    backup_id string
    The stable Dokploy backup ID.
    id string
    The provider-assigned unique ID for this managed resource.
    backupId String
    The stable Dokploy backup ID.
    id String
    The provider-assigned unique ID for this managed resource.
    backupId string
    The stable Dokploy backup ID.
    id string
    The provider-assigned unique ID for this managed resource.
    backup_id str
    The stable Dokploy backup ID.
    id str
    The provider-assigned unique ID for this managed resource.
    backupId String
    The stable Dokploy backup ID.
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    dokploy dimeskigj/pulumi-dokploy
    License
    Apache-2.0
    dokploy logo Dokploy
    Viewing docs for Dokploy v0.3.1
    published on Tuesday, Sep 29, 2026 by dimeskigj

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial