Skip to content
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

Reorganize the output of lsbackup command #7354

Merged
merged 9 commits into from
Feb 1, 2021

Conversation

OmarAyo
Copy link
Contributor

@OmarAyo OmarAyo commented Jan 22, 2021

  • Added Type of backup (full or incremental) to the output of lsbackup
  • Reorganized the output (example below)
  • Removed long description as it was too verbose
  • Removed unnecessary glog message that prints if the minio bucket exists, this helps with formating the output property (e.g. using jq ). If the bucket doesn't exist will get info about it

Currently the output of lsbackup is:

[Decoder]: Using assembly version of decoder
Page Size: 4096
Listing backups from: /home/omar/Desktop/Dgraph/20.11/bkp
Name	Since	Groups	Encrypted
/home/omar/Desktop/Dgraph/20.11/bkp/dgraph.20210128.144842.388/manifest.json	60005	map[1:[dgraph.type dgraph.graphql.xid dgraph.graphql.schema dgraph.graphql.schema_created_at series score dgraph.graphql.p_sha256hash dgraph.cors dgraph.graphql.p_query dgraph.drop.op dgraph.graphql.schema_history]]	false

This PR will change reorganize it into the following output:

[Decoder]: Using assembly version of decoder
Page Size: 4096
[
	{
		"path": "/home/omar/Desktop/Dgraph/20.11/bkp/dgraph.20210121.125014.852/manifest.json",
		"since": 30005,
		"backup_id": "reverent_vaughan0",
		"backup_num": 1,
		"encrypted": false,
		"type": "full"
	},

Also added verbose flag:

     --verbose           Outputs additional info in backup list.

When enabling it, we will get additional information about groups and DropOperations
e.g.

		"groups": {
			"1": [
				"dgraph.graphql.schema_created_at",
				"dgraph.graphql.xid",
				"dgraph.drop.op",
				"dgraph.type",
				"dgraph.cors",
				"dgraph.graphql.schema_history",
				"score",
				"dgraph.graphql.p_query",
				"dgraph.graphql.schema",
				"dgraph.graphql.p_sha256hash",
				"series"
			]
		}

This change is Reviewable

- Added Type of backup (full or incremental) to the output of lsbackup
@OmarAyo OmarAyo requested a review from danielmai January 22, 2021 13:29
@github-actions github-actions bot added the area/enterprise Related to proprietary features label Jan 22, 2021
Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @manishrjain and @vvbalaji-dgraph)

@OmarAyo OmarAyo merged commit d577435 into master Feb 1, 2021
@OmarAyo OmarAyo deleted the omar/lsbkpcmd_output_polish branch February 1, 2021 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/enterprise Related to proprietary features
Development

Successfully merging this pull request may close these issues.

2 participants