We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
The lsbackup
command-line tool prints information about the stored backups in
a user-defined location.
The lsbackup
command has two flags:
--location
: indicates a source URI with Dgraph backup
objects. This URI supports all the schemes used for backup.--verbose
: if enabled will print additional information about the selected
backup.For example, you can execute the lsbackup
command as follows:
Source URI formats:
[scheme]://[host]/[path]?[args]
[scheme]:///[path]?[args]
/[path]?[args]
(only for local or NFS)Source URI parts:
scheme
: service handler, one of: s3
, minio
, file
host
: remote address; e.g.: dgraph.s3.amazonaws.com
path
: directory, bucket or container at target; e.g.: /dgraph/backups/
args
: specific arguments that are ok to appear in logsThe following snippet is an example output of lsbackup
:
If the --verbose
flag was enabled, the output would look like this:
path
: Name of the backup
since
: is the timestamp at which this backup was taken. It is called Since
because it will become the timestamp from which to backup in the next
incremental backup.
groups
: is the map of valid groups to predicates at the time the backup was
created. This is printed only if --verbose
flag is enabled
encrypted
: Indicates whether this backup is encrypted or not
type
: Indicates whether this backup is a full or incremental one
drop_operation
: lists the various DROP operations that took place since the
last backup. These are used during restore to redo those operations before
applying the backup. (This is printed only if --verbose
flag is enabled)
backup_num
: is a monotonically increasing number assigned to each backup in
a series. The full backup as BackupNum equal to one and each incremental
backup gets assigned the next available number. This can be used to verify the
integrity of the data during a restore.
backup_id
: is a unique ID assigned to all the backups in the same series.
Checking information about backups stored in an AWS S3 bucket:
You might need to set up access and secret key environment variables in the
shell (or session) you are going to run the lsbackup
command. For example:
Checking information about backups stored in a MinIO bucket:
In case the MinIO server is started without tls
, you must specify that
secure=false
as it set to true
by default. You also need to set the
environment variables for the access key and secret key.
In order to get the lsbackup
running, you should following these steps:
Set MINIO_ACCESS_KEY
as an environment variable for the running shell this
can be done with the following command: (minioadmin
is the default access
key, unless is changed by the user)
Set MINIO_SECRET_KEY as an environment variable for the running shell this can
be done with the following command: (minioadmin
is the default secret key,
unless is changed by the user)
Add the argument secure=false
to the lsbackup command
, that means the
command will look like: (the double quotes "
are required)
Checking information about backups stored locally (on disk):
We’re overhauling Dgraph’s docs to make them clearer and more approachable. If you notice any issues during this transition or have suggestions, please let us know.
The lsbackup
command-line tool prints information about the stored backups in
a user-defined location.
The lsbackup
command has two flags:
--location
: indicates a source URI with Dgraph backup
objects. This URI supports all the schemes used for backup.--verbose
: if enabled will print additional information about the selected
backup.For example, you can execute the lsbackup
command as follows:
Source URI formats:
[scheme]://[host]/[path]?[args]
[scheme]:///[path]?[args]
/[path]?[args]
(only for local or NFS)Source URI parts:
scheme
: service handler, one of: s3
, minio
, file
host
: remote address; e.g.: dgraph.s3.amazonaws.com
path
: directory, bucket or container at target; e.g.: /dgraph/backups/
args
: specific arguments that are ok to appear in logsThe following snippet is an example output of lsbackup
:
If the --verbose
flag was enabled, the output would look like this:
path
: Name of the backup
since
: is the timestamp at which this backup was taken. It is called Since
because it will become the timestamp from which to backup in the next
incremental backup.
groups
: is the map of valid groups to predicates at the time the backup was
created. This is printed only if --verbose
flag is enabled
encrypted
: Indicates whether this backup is encrypted or not
type
: Indicates whether this backup is a full or incremental one
drop_operation
: lists the various DROP operations that took place since the
last backup. These are used during restore to redo those operations before
applying the backup. (This is printed only if --verbose
flag is enabled)
backup_num
: is a monotonically increasing number assigned to each backup in
a series. The full backup as BackupNum equal to one and each incremental
backup gets assigned the next available number. This can be used to verify the
integrity of the data during a restore.
backup_id
: is a unique ID assigned to all the backups in the same series.
Checking information about backups stored in an AWS S3 bucket:
You might need to set up access and secret key environment variables in the
shell (or session) you are going to run the lsbackup
command. For example:
Checking information about backups stored in a MinIO bucket:
In case the MinIO server is started without tls
, you must specify that
secure=false
as it set to true
by default. You also need to set the
environment variables for the access key and secret key.
In order to get the lsbackup
running, you should following these steps:
Set MINIO_ACCESS_KEY
as an environment variable for the running shell this
can be done with the following command: (minioadmin
is the default access
key, unless is changed by the user)
Set MINIO_SECRET_KEY as an environment variable for the running shell this can
be done with the following command: (minioadmin
is the default secret key,
unless is changed by the user)
Add the argument secure=false
to the lsbackup command
, that means the
command will look like: (the double quotes "
are required)
Checking information about backups stored locally (on disk):