-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a project id option -j so that the script can be run to backup multiple projects without needing to change the gcloud config core.project each time. Here's an example of how we'll be using the feature.
- Loading branch information
Showing
2 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -72,6 +72,8 @@ Options: | |
Default if not set: 'gcs' [OPTIONAL] | ||
-a Service Account to use. | ||
Blank if not set [OPTIONAL] | ||
-j Project ID to use. | ||
Blank if not set [OPTIONAL] | ||
-n Dry run: causes script to print debug variables and doesn't execute any | ||
create / delete commands [OPTIONAL] | ||
``` | ||
|
@@ -154,6 +156,20 @@ For example: | |
|
||
./gcloud-snapshot.sh -a "[email protected]" | ||
|
||
### Project ID | ||
By default snapshots are created with the default gcloud project id. To use a custom project id use the -j flag: | ||
|
||
Usage: ./gcloud-snapshot.sh [-j <project_id>] | ||
|
||
Options: | ||
|
||
-j Project ID to use. | ||
Blank if not set [OPTIONAL] | ||
|
||
For example: | ||
|
||
./gcloud-snapshot.sh -j "my-test-project" | ||
|
||
### Dry Run | ||
The script can be run in dry run mode, which doesn't execute any create / delete commands, and prints out debug information. | ||
|
||
|
@@ -229,4 +245,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of | |
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains 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