-fn create_backup<'a>(
- param: Value,
- info: &'static ApiMethod,
- rpcenv: &'a mut dyn RpcEnvironment,
-) -> ApiFuture<'a> {
-
- async move {
- create_backup_async(param, info, rpcenv).await
- }.boxed()
-}
-
-async fn create_backup_async(
+#[api(
+ input: {
+ properties: {
+ backupspec: {
+ type: Array,
+ description: "List of backup source specifications ([<label.ext>:<path>] ...)",
+ items: {
+ schema: BACKUP_SOURCE_SCHEMA,
+ }
+ },
+ repository: {
+ schema: REPO_URL_SCHEMA,
+ optional: true,
+ },
+ "include-dev": {
+ description: "Include mountpoints with same st_dev number (see ``man fstat``) as specified files.",
+ optional: true,
+ items: {
+ type: String,
+ description: "Path to file.",
+ }
+ },
+ keyfile: {
+ schema: KEYFILE_SCHEMA,
+ optional: true,
+ },
+ "skip-lost-and-found": {
+ type: Boolean,
+ description: "Skip lost+found directory.",
+ optional: true,
+ },
+ "backup-type": {
+ schema: BACKUP_TYPE_SCHEMA,
+ optional: true,
+ },
+ "backup-id": {
+ schema: BACKUP_ID_SCHEMA,
+ optional: true,
+ },
+ "backup-time": {
+ schema: BACKUP_TIME_SCHEMA,
+ optional: true,
+ },
+ "chunk-size": {
+ schema: CHUNK_SIZE_SCHEMA,
+ optional: true,
+ },
+ "exclude": {
+ type: Array,
+ description: "List of paths or patterns for matching files to exclude.",
+ optional: true,
+ items: {
+ type: String,
+ description: "Path or match pattern.",
+ }
+ },
+ "entries-max": {
+ type: Integer,
+ description: "Max number of entries to hold in memory.",
+ optional: true,
+ default: proxmox_backup::pxar::ENCODER_MAX_ENTRIES as isize,
+ },
+ "verbose": {
+ type: Boolean,
+ description: "Verbose output.",
+ optional: true,
+ },
+ }
+ }
+)]
+/// Create (host) backup.
+async fn create_backup(