Repository navigation
NAS backup: support incremental backups of RBD volumes #14386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
weizhouapache
wants to merge
22
commits into
apache:main
Choose a base branch
from
weizhouapache:24-incremental-backup-rbd-volume-on-nas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,994
−218
Draft
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
68a403c
test: support Ceph/RBD primary storage in NAS backup smoke test
weizhouapache 5fa0054
KVM: support incremental NAS backups of RBD volumes
weizhouapache 0cdbf56
test: run the NAS backup smoke test on a cloud-init template
weizhouapache a4a8c27
test: validate a whole backup chain, including across a mid-chain delete
weizhouapache 3321f0a
test: verify the guest of a VM created from a backup, not just that i…
weizhouapache a8fddbf
nasbackup: carry the backup method separately from the mode
weizhouapache 935adf0
utils: add RbdUtils for the Ceph monitors of an RBD pool
weizhouapache 5b393a1
kvm: build the Ceph monitors of the restore backup command with RbdUtils
weizhouapache 27012a3
backup: name the rbd method in the TakeBackupCommand comment
weizhouapache 88d1990
Add package dependencies
weizhouapache a74c7c4
Add ceph-common as dependencies
weizhouapache 9786f67
kvm: refuse an RBD restore that would destroy a snapshot we did not take
weizhouapache 8d8cd5e
kvm: drop the cephx key file from a trap in nasbackup.sh
weizhouapache 39cc104
utils: test the escaped colons of an IPv6 Ceph monitor without a port
weizhouapache bafa96b
kvm: remove the backup anchor once the chain it anchors is gone
weizhouapache 38d5fb7
nas: decide a chain from its flavour rather than from an rbd flag
weizhouapache eb41943
Merge remote-tracking branch 'apache/main' into 24-incremental-backup…
weizhouapache 95a7402
packaging: suggest ceph-common instead of requiring it
weizhouapache 729de6e
nas: address review of the RBD incremental backups
weizhouapache fcceb02
nas: run RBD backups on a host that has the rbd command
weizhouapache 5bd6a26
nas: restore RBD backups on a host that has the rbd command
weizhouapache beb3952
import com.cloud.utils.exception.CloudRuntimeException
weizhouapache File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
core/src/main/java/org/apache/cloudstack/backup/RemoveBackupAnchorsCommand.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| // | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
| // | ||
|
|
||
| package org.apache.cloudstack.backup; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; | ||
|
|
||
| import com.cloud.agent.api.Command; | ||
|
|
||
| /** | ||
| * Remove the backup anchors of an Instance's volumes: the RBD snapshots an incremental chain is | ||
| * exported from. An anchor is only kept to export the next incremental from it, so once the chain | ||
| * is gone the next backup is a full one and the anchor would only keep the data it references | ||
| * allocated in the pool. | ||
| */ | ||
| public class RemoveBackupAnchorsCommand extends Command { | ||
| private List<PrimaryDataStoreTO> volumePools; | ||
| private List<String> volumePaths; | ||
|
|
||
| public RemoveBackupAnchorsCommand(List<PrimaryDataStoreTO> volumePools, List<String> volumePaths) { | ||
| super(); | ||
| this.volumePools = volumePools; | ||
| this.volumePaths = volumePaths; | ||
| } | ||
|
|
||
| public List<PrimaryDataStoreTO> getVolumePools() { | ||
| return volumePools; | ||
| } | ||
|
|
||
| public void setVolumePools(List<PrimaryDataStoreTO> volumePools) { | ||
| this.volumePools = volumePools; | ||
| } | ||
|
|
||
| public List<String> getVolumePaths() { | ||
| return volumePaths; | ||
| } | ||
|
|
||
| public void setVolumePaths(List<String> volumePaths) { | ||
| this.volumePaths = volumePaths; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean executeInSequence() { | ||
| return true; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.