mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-28 02:57:28 +08:00
feat: 完成快照同步功能
This commit is contained in:
+175
-16
@@ -1169,6 +1169,42 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/backups/search/files": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取备份账号内文件列表",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Backup Account"
|
||||
],
|
||||
"summary": "List files from backup accounts",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.BackupSearchFile"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "anrry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/backups/update": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -3907,7 +3943,7 @@ var doc = `{
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.MysqlDescription"
|
||||
"$ref": "#/definitions/dto.UpdateDescription"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -6285,7 +6321,7 @@ var doc = `{
|
||||
"tags": [
|
||||
"System Setting"
|
||||
],
|
||||
"summary": "Create system backup",
|
||||
"summary": "Create system snapshot",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -6365,6 +6401,101 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/settings/snapshot/description/update": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "更新快照描述信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"System Setting"
|
||||
],
|
||||
"summary": "Update snapshot description",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.UpdateDescription"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"x-panel-log": {
|
||||
"BeforeFuntions": [
|
||||
{
|
||||
"db": "snapshots",
|
||||
"input_colume": "id",
|
||||
"input_value": "id",
|
||||
"isList": false,
|
||||
"output_colume": "name",
|
||||
"output_value": "name"
|
||||
}
|
||||
],
|
||||
"bodyKeys": [
|
||||
"id",
|
||||
"description"
|
||||
],
|
||||
"formatEN": "The description of the snapshot [name] is modified =\u003e [description]",
|
||||
"formatZH": "快照 [name] 描述信息修改 [description]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"/settings/snapshot/import": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "导入已有快照",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"System Setting"
|
||||
],
|
||||
"summary": "Import system snapshot",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SnapshotImport"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"x-panel-log": {
|
||||
"BeforeFuntions": [],
|
||||
"bodyKeys": [
|
||||
"from",
|
||||
"names"
|
||||
],
|
||||
"formatEN": "Sync system snapshots [names] from [from]",
|
||||
"formatZH": "从 [from] 同步系统快照 [names]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"/settings/snapshot/recover": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -8474,6 +8605,17 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.BackupSearchFile": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.BatchDelete": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -9751,20 +9893,6 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.MysqlDescription": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.MysqlStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10451,6 +10579,23 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SnapshotImport": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"names": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SnapshotRecover": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10468,6 +10613,20 @@ var doc = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UpdateDescription": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.Upgrade": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+175
-16
@@ -1155,6 +1155,42 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/backups/search/files": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取备份账号内文件列表",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Backup Account"
|
||||
],
|
||||
"summary": "List files from backup accounts",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.BackupSearchFile"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "anrry"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/backups/update": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -3893,7 +3929,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.MysqlDescription"
|
||||
"$ref": "#/definitions/dto.UpdateDescription"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -6271,7 +6307,7 @@
|
||||
"tags": [
|
||||
"System Setting"
|
||||
],
|
||||
"summary": "Create system backup",
|
||||
"summary": "Create system snapshot",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
@@ -6351,6 +6387,101 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/settings/snapshot/description/update": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "更新快照描述信息",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"System Setting"
|
||||
],
|
||||
"summary": "Update snapshot description",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.UpdateDescription"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"x-panel-log": {
|
||||
"BeforeFuntions": [
|
||||
{
|
||||
"db": "snapshots",
|
||||
"input_colume": "id",
|
||||
"input_value": "id",
|
||||
"isList": false,
|
||||
"output_colume": "name",
|
||||
"output_value": "name"
|
||||
}
|
||||
],
|
||||
"bodyKeys": [
|
||||
"id",
|
||||
"description"
|
||||
],
|
||||
"formatEN": "The description of the snapshot [name] is modified =\u003e [description]",
|
||||
"formatZH": "快照 [name] 描述信息修改 [description]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"/settings/snapshot/import": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "导入已有快照",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"System Setting"
|
||||
],
|
||||
"summary": "Import system snapshot",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SnapshotImport"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"x-panel-log": {
|
||||
"BeforeFuntions": [],
|
||||
"bodyKeys": [
|
||||
"from",
|
||||
"names"
|
||||
],
|
||||
"formatEN": "Sync system snapshots [names] from [from]",
|
||||
"formatZH": "从 [from] 同步系统快照 [names]",
|
||||
"paramKeys": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"/settings/snapshot/recover": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -8460,6 +8591,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.BackupSearchFile": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.BatchDelete": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -9737,20 +9879,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.MysqlDescription": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.MysqlStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -10437,6 +10565,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SnapshotImport": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"from": {
|
||||
"type": "string"
|
||||
},
|
||||
"names": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SnapshotRecover": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -10454,6 +10599,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UpdateDescription": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.Upgrade": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
+113
-11
@@ -28,6 +28,13 @@ definitions:
|
||||
- type
|
||||
- vars
|
||||
type: object
|
||||
dto.BackupSearchFile:
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
dto.BatchDelete:
|
||||
properties:
|
||||
names:
|
||||
@@ -890,15 +897,6 @@ definitions:
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
dto.MysqlDescription:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
dto.MysqlStatus:
|
||||
properties:
|
||||
Aborted_clients:
|
||||
@@ -1354,6 +1352,17 @@ definitions:
|
||||
required:
|
||||
- from
|
||||
type: object
|
||||
dto.SnapshotImport:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
from:
|
||||
type: string
|
||||
names:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
dto.SnapshotRecover:
|
||||
properties:
|
||||
id:
|
||||
@@ -1365,6 +1374,15 @@ definitions:
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
dto.UpdateDescription:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
dto.Upgrade:
|
||||
properties:
|
||||
version:
|
||||
@@ -3358,6 +3376,28 @@ paths:
|
||||
summary: List buckets
|
||||
tags:
|
||||
- Backup Account
|
||||
/backups/search/files:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 获取备份账号内文件列表
|
||||
parameters:
|
||||
- description: request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.BackupSearchFile'
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: anrry
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: List files from backup accounts
|
||||
tags:
|
||||
- Backup Account
|
||||
/backups/update:
|
||||
post:
|
||||
consumes:
|
||||
@@ -5100,7 +5140,7 @@ paths:
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.MysqlDescription'
|
||||
$ref: '#/definitions/dto.UpdateDescription'
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
@@ -6621,7 +6661,7 @@ paths:
|
||||
description: ""
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create system backup
|
||||
summary: Create system snapshot
|
||||
tags:
|
||||
- System Setting
|
||||
x-panel-log:
|
||||
@@ -6665,6 +6705,68 @@ paths:
|
||||
formatEN: Delete system backup [name]
|
||||
formatZH: 删除系统快照 [name]
|
||||
paramKeys: []
|
||||
/settings/snapshot/description/update:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 更新快照描述信息
|
||||
parameters:
|
||||
- description: request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.UpdateDescription'
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Update snapshot description
|
||||
tags:
|
||||
- System Setting
|
||||
x-panel-log:
|
||||
BeforeFuntions:
|
||||
- db: snapshots
|
||||
input_colume: id
|
||||
input_value: id
|
||||
isList: false
|
||||
output_colume: name
|
||||
output_value: name
|
||||
bodyKeys:
|
||||
- id
|
||||
- description
|
||||
formatEN: The description of the snapshot [name] is modified => [description]
|
||||
formatZH: 快照 [name] 描述信息修改 [description]
|
||||
paramKeys: []
|
||||
/settings/snapshot/import:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 导入已有快照
|
||||
parameters:
|
||||
- description: request
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.SnapshotImport'
|
||||
responses:
|
||||
"200":
|
||||
description: ""
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Import system snapshot
|
||||
tags:
|
||||
- System Setting
|
||||
x-panel-log:
|
||||
BeforeFuntions: []
|
||||
bodyKeys:
|
||||
- from
|
||||
- names
|
||||
formatEN: Sync system snapshots [names] from [from]
|
||||
formatZH: 从 [from] 同步系统快照 [names]
|
||||
paramKeys: []
|
||||
/settings/snapshot/recover:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user