# Function copy_tenant_template

- copy_tenant_template(__namedParameters): Promise<void>

- Copy template data into tenant (target)

  - create backup from template tenant
  - restore backup to target tenant
  - clean up user_id in files
  - delete users (including sequence reset)

  #### Parameters

  - ##### __namedParameters: {
    loadAndSaveNewPlugin: ((plugin) => void);
    target: string;
    tenant_template: string;
    }

    - ##### loadAndSaveNewPlugin: ((plugin) => void)

      - - (plugin): void

        - #### Parameters

          - ##### plugin: Plugin

          #### Returns void

    - ##### target: string

    - ##### tenant_template: string

  #### Returns Promise<void>

  - Defined in saltcorn-admin-models/models/tenant.ts:121

Generated using TypeDoc