Repository Operations
Use ttGridAdmin
commands in this section to create, attach, detach, or list repositories.
In TimesTen Scaleout, a repository is a file system directory tree used for database backups or exports or for collections of daemon logs. You specify the top-level directory when you create the repository. The contents of the directory and subdirectories of a repository, whether consisting of a backup, an export, or daemon logs, comprise a collection.
A repository is either mounted on each host of the grid (using NFS or equivalent), or mounted on a single host (optionally in the grid) and accessed by other hosts using scp
(SSH copy).
For additional information, refer to Migrating, Backing Up and Restoring Data in Oracle TimesTen In-Memory Database Scaleout User's Guide.
Attach a Repository (repositoryAttach)
The repositoryAttach
command attaches an existing repository to the grid, making it available for use.
ttGridAdmin repositoryAttach name -path path -method mount|scp [-address internalAddress]
Options
The repositoryAttach
command has the options:
Option | Description |
---|---|
|
Name of the repository to attach. |
|
Fully qualified path to the parent directory where the repository is located. For For |
|
Indicates how grid instances access the repository. Supported options are
Note: The |
|
For repositories accessed through Also see Address Formats. |
Examples
This example attaches a repository /repositories/repo1
that is located on the system mysys2
, using -method scp
.
% ttGridAdmin repositoryAttach repo1 -path /repositories -method scp -address mysys2.example.com Repository repo1 attached
Note:
This command is typically used to attach a repository that was created from another grid, so that you can restore a backup of a database from one grid into another grid. It can also be used to reattach a repository to the grid where it was created, if it was detached.
Create a Repository (repositoryCreate)
The repositoryCreate
command creates a new repository that will be available for the grid.
ttGridAdmin repositoryCreate name -path path -method mount|scp [-address internalAddress]
Options
The repositoryCreate
command has the options:
Option | Description |
---|---|
|
Specifies the name for the repository. This is the name of the directory that will be created under the parent directory specified by |
|
Fully qualified path to the parent directory where the repository is to be created. This directory must already exist on the system(s) where the repository will be located and be readable and writable by the instance administrator. For For |
|
Indicates how grid instances access the repository. Supported options are
Note: If you will later use |
|
For repositories accessed through Also see Address Formats. |
Examples
This example creates a repository /repositories/repo1
on the system mysys2
, using scp
. The instance administrator must have write permission for /repositories
.
% ttGridAdmin repositoryCreate repo1 -path /repositories -method scp -address mysys2.example.com Repository repo1 created
This example creates the repository using mount
.
% ttGridAdmin repositoryCreate repo1 -path /repositories -method mount Repository repo1 created
The repository.json
file has information about the repository.
Notes
-
The repository directory is created synchronously and has permissions of 700. For repositories accessed through NFS mount, the repository directory is
path
/
name
. For repositories access throughscp
, the repository directory is@
address
:
path
/
name
. -
The repository is available for use as soon as it is created.
-
Once a repository is created with
repositoryCreate
, you can userepositoryAttach
to access it from other grids.
Detach a Repository (repositoryDetach)
The repositoryDetach
command detaches (disassociates) a repository from the grid, so that it will no longer be usable from the grid.
ttGridAdmin repositoryDetach name
Options
The repositoryDetach
command has the option:
Option | Description |
---|---|
|
Name of the repository to detach (as established when it was attached or created). |
Examples
% ttGridAdmin repositoryDetach repo1 Repository repo1 detached
Notes
You can detach a repository that was created in the grid or, more typically, attached in the grid.
List Repositories (repositoryList)
The repositoryList
command lists repositories that are accessible (created or attached) in the grid, optionally including information about contents of the repositories—database backups, database exports, or collections of daemon logs and other information.
ttGridAdmin repositoryList [name]
[-contents [-details]]
Options
The repositoryList
command has the options:
Option | Description |
---|---|
|
Name of the repository to list. If no name is specified, all repositories accessible to the grid are listed. |
|
Show the contents of each repository listed. |
|
Show details about the contents of each repository listed (use with |
Examples
This examples lists all repositories accessible to the grid (there is only one), but no contents.
% ttGridAdmin repositoryList Repository Method Location Address ---------- ------ ------------------- ------------------ repo1 scp /repositories/repo1 mysys2.example.com
This example shows contents:
% ttGridAdmin repositoryList -contents Repository Collection Type Date Details ---------- --------------- ------ ------------------------ ------------------ repo1 B20170222145544 Backup 2017-02-22T14:55:48.000Z Database database1