aria_s3_copy
You are viewing an old version of this article. View
the current version here.
Copies an Aria table to and from s3.
The Aria table must be non transactional and have ROW_FORMAT=PAGE.
For aria_s3_copy
to work reliable the table should not be changed by the MariaDB server during the copy and one should have done FLUSH TABLES first to ensure that the table is properly closed.
Example of properly created Aria table:
create table test1 (a int) transactional=0 row_format=PAGE engine=aria;
Note that when using ALTER TABLE table_name ENGINE=S3 this restriction doesn't apply.
Main arguments
Option | Description |
---|---|
-?, --help | Display this help and exit. |
-k, --s3-access-key=name | AWS access key ID |
-r, --s3-region=name | AWS region |
-K, --s3-secret-key=name | AWS secret access key ID |
-b, --s3-bucket=name | AWS prefix for tables |
-c, --compress | Use compression |
-o, --op=name | Operation to excecute. One of 'from_s3', 'to_s3' or 'delete_from_s3' |
-d, --database=name | Database for copied table (second prefix). If not given, the directory of the table file is used |
-B, --s3-block-size=# | Block size for data/index blocks in s3 |
-f, --force | Force copy even if target exists |
-v, --verbose | Write more information |
-V, --version | Print version and exit. |
-#, --debug[=name] | Output debug log. Often this is 'd:t:o,filename'. |
--s3-debug | Output debug log from marias3 to stdout |
Typical configuration in a .my.cnf file
[aria_s3_copy] s3-bucket=mariadb s3-access-key=xxxx s3-secret-key=xxx s3-region=eu-north-1 verbose=1 op=to
Example usage
The following code will copy an existing Aria table named test1
to S3.
If the option --database
is not given, then the directory name where the table files exists will be used as the database.
shell> aria_s3_copy --force --op=to --database=foo --compress --verbose --s3_block_size=4M test1 Delete of aria table: foo.test1 Delete of index information foo/test1/index Delete of data information foo/test1/data Delete of base information and frm Copying frm file test1.frm Copying aria table: foo.test1 to s3 Creating aria table information foo/test1/aria Copying index information foo/test1/index . Copying data information foo/test1/data .
When using --verbose
, aria_s3_copy
will write a dot for each #/79 part of the file copied.
See also
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.