Difference between revisions of "Velero backup create"

From wikieduonline
Jump to navigation Jump to search
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
https://velero.io/docs/main/backup-reference/
+
  [[velero backup create --help]] (https://velero.io/docs/main/backup-reference/
  
  [[velero backup create --help]]
+
  [[--ttl]] default to 30 days (720 hours)
 +
--ttl [[8766]] (1 year)
 +
An error occurred: invalid argument "8766" for "--ttl" flag: time: missing unit in duration "8766"
  
  [[velero backup]] create my-backup-from-mynamespace --include-namespaces my-backup-from-mynamespace
+
  velero backup create backup --include-namespaces namespace --ttl 8766h
  
 +
== Create a new backup ==
 +
[[velero backup]] create mynewname-backup --include-namespaces mynamespace
  
  velero backup create my-backup-from-mynamespace [[--include-namespaces]] my-backup-from-mynamespace
+
=== Create backup of namespace ===
[[velero backup create]] my-nginx-backup [[--selector]] app=nginx
+
  velero backup create mynewname-backup [[--include-namespaces]] mynamespace
  
 +
=== Create backup of: app ===
 +
[[velero backup]] create my-nginx-backup [[--selector]] app=nginx
 +
 +
== Outputs ==
 
  velero backup create yournamespace [[--include-namespaces]] yournamespace
 
  velero backup create yournamespace [[--include-namespaces]] yournamespace
 
  Backup request "yournamespace" submitted successfully.
 
  Backup request "yournamespace" submitted successfully.
 
  Run `velero backup describe yournamespace` or `[[velero backup logs]] yournamespace` for more details.
 
  Run `velero backup describe yournamespace` or `[[velero backup logs]] yournamespace` for more details.
 
  
 
  velero backup create mybackupName --include-cluster-resources=true --ordered-resources 'pods=ns1/pod1,ns1/pod2;persistentvolumes=pv4,pv8' --include-namespaces=ns1
 
  velero backup create mybackupName --include-cluster-resources=true --ordered-resources 'pods=ns1/pod1,ns1/pod2;persistentvolumes=pv4,pv8' --include-namespaces=ns1
 
  velero backup create mybackupName --ordered-resources 'statefulsets=ns1/sts1,ns1/sts0' --include-namespaces=yournamespace
 
  velero backup create mybackupName --ordered-resources 'statefulsets=ns1/sts1,ns1/sts0' --include-namespaces=yournamespace
 
  
 
  [[velero backup]] create mytest
 
  [[velero backup]] create mytest
 
  Backup request "mytest" submitted successfully.
 
  Backup request "mytest" submitted successfully.
 
  Run `[[velero backup describe]] mytest` or `[[velero backup logs]] mytest` for more details.
 
  Run `[[velero backup describe]] mytest` or `[[velero backup logs]] mytest` for more details.
 
== Output examples ==
 
<pre>velero backup describe your-backupname
 
Name:        yourbackup
 
Namespace:    velero
 
Labels:      velero.io/storage-location=default
 
Annotations:  velero.io/source-cluster-k8s-gitversion=v1.19.15
 
              velero.io/source-cluster-k8s-major-version=1
 
              velero.io/source-cluster-k8s-minor-version=19 
 
 
Phase:  PartiallyFailed (run `velero backup logs yourbackup` for more information)
 
 
Warnings:  <error getting warnings: DownloadRequest.velero.io "yournamesapce-12345" is invalid: spec.target.kind: Unsupported value:
 
"BackupResults": supported values: "BackupLog", "BackupContents", "BackupVolumeSnapshots", "BackupItemSnapshots", "BackupResourceList",
 
"RestoreLog", "RestoreResults">
 
 
Errors:  <error getting errors: DownloadRequest.velero.io "yournamespace123456" is invalid: spec.target.kind: Unsupported value:
 
"BackupResults": supported values: "BackupLog", "BackupContents", "BackupVolumeSnapshots", "BackupItemSnapshots", "BackupResourceList",
 
"RestoreLog", "RestoreResults">
 
 
Namespaces:
 
  Included:  yournamespace
 
  Excluded:  <none>
 
 
Resources:
 
  Included:        *
 
  Excluded:        <none>
 
  Cluster-scoped:  auto
 
 
Label selector:  <none>
 
 
Or label selector:  <none>
 
 
Storage Location:  default
 
 
Velero-Native Snapshot PVs:  auto
 
Snapshot Move Data:          auto
 
Data Mover:                  velero
 
 
TTL:  720h0m0s
 
 
CSISnapshotTimeout:    0s
 
ItemOperationTimeout:  0s
 
 
Hooks:  <none>
 
 
Backup Format Version:  1.1.0
 
 
Started:    2000-02-05 10:49:37 +0100 CET
 
Completed:  2000-02-05 10:49:48 +0100 CET
 
 
Expiration:  2024-03-06 10:49:37 +0100 CET
 
 
Total items to be backed up:  0
 
Items backed up:              0</pre>
 
  
 
== Errors ==
 
== Errors ==
Line 87: Line 38:
 
* <code>[[velero backup get]]</code>
 
* <code>[[velero backup get]]</code>
 
* <code>[[velero create]]</code>
 
* <code>[[velero create]]</code>
 +
* <code>[[velero schedule create]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{velero backup create}}
 
* {{velero backup}}
 
* {{velero backup}}
 
* {{velero}}
 
* {{velero}}
  
 
[[Category:Velero]]
 
[[Category:Velero]]

Latest revision as of 12:01, 5 February 2024

 velero backup create --help (https://velero.io/docs/main/backup-reference/
--ttl default to 30 days (720 hours)
--ttl 8766 (1 year)
An error occurred: invalid argument "8766" for "--ttl" flag: time: missing unit in duration "8766"
velero backup create backup --include-namespaces namespace --ttl 8766h

Create a new backup[edit]

velero backup create mynewname-backup --include-namespaces mynamespace

Create backup of namespace[edit]

velero backup create mynewname-backup --include-namespaces mynamespace

Create backup of: app[edit]

velero backup create my-nginx-backup --selector app=nginx

Outputs[edit]

velero backup create yournamespace --include-namespaces yournamespace
Backup request "yournamespace" submitted successfully.
Run `velero backup describe yournamespace` or `velero backup logs yournamespace` for more details.
velero backup create mybackupName --include-cluster-resources=true --ordered-resources 'pods=ns1/pod1,ns1/pod2;persistentvolumes=pv4,pv8' --include-namespaces=ns1
velero backup create mybackupName --ordered-resources 'statefulsets=ns1/sts1,ns1/sts0' --include-namespaces=yournamespace
velero backup create mytest
Backup request "mytest" submitted successfully.
Run `velero backup describe mytest` or `velero backup logs mytest` for more details.

Errors[edit]

velero backup create
An error occurred: a backup name is required, unless you are creating based on a schedule

Related[edit]

See also[edit]

Advertising: