Marian Harbach | ebeb154 | 2019-12-13 10:42:46 +0100 | [diff] [blame] | 1 | :linkattrs: |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 2 | = MigrateAccountPatchReviewDb |
| 3 | |
| 4 | == NAME |
Gert van Dijk | 0c25d46 | 2017-10-19 22:57:25 +0200 | [diff] [blame] | 5 | MigrateAccountPatchReviewDb - Migrates AccountPatchReviewDb from one database |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 6 | backend to another. |
| 7 | |
| 8 | == SYNOPSIS |
| 9 | [verse] |
| 10 | -- |
| 11 | _java_ -jar gerrit.war MigrateAccountPatchReviewDb |
| 12 | -d <SITE_PATH> |
| 13 | [--sourceUrl] [--chunkSize] |
| 14 | -- |
| 15 | |
| 16 | == DESCRIPTION |
| 17 | Migrates AccountPatchReviewDb from one database backend to another. The |
| 18 | AccountPatchReviewDb is a database used to store the user file reviewed flags. |
| 19 | |
David Pursehouse | 6cd0a79 | 2017-04-26 11:40:48 +0200 | [diff] [blame] | 20 | This command is only intended to be run if the configuration parameter |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 21 | link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
| 22 | is set or changed. |
| 23 | |
| 24 | To migrate AccountPatchReviewDb: |
| 25 | |
| 26 | * Stop Gerrit |
| 27 | * Configure new value for link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
David Pursehouse | 6cd0a79 | 2017-04-26 11:40:48 +0200 | [diff] [blame] | 28 | * Migrate data using this command |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 29 | * Start Gerrit |
| 30 | |
Saša Živkov | 1abb73e | 2018-02-15 11:51:51 +0100 | [diff] [blame] | 31 | [NOTE] |
| 32 | When using MySQL, the file_name column length in the account_patch_reviews table will be shortened |
| 33 | from the standard 4096 characters down to 255 characters. This is due to a |
Marian Harbach | 3425337 | 2019-12-10 18:01:31 +0100 | [diff] [blame] | 34 | link:https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html[MySQL limitation,role=external,window=_blank] |
Saša Živkov | 1abb73e | 2018-02-15 11:51:51 +0100 | [diff] [blame] | 35 | on the max size of 767 bytes for each column in an index. |
| 36 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 37 | == OPTIONS |
| 38 | |
| 39 | -d:: |
Gert van Dijk | 0c25d46 | 2017-10-19 22:57:25 +0200 | [diff] [blame] | 40 | --site-path:: |
| 41 | Location of the `gerrit.config` file, and all other per-site |
| 42 | configuration data, supporting libraries and log files. |
| 43 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 44 | --sourceUrl:: |
| 45 | Url of source database. Only need to be specified if the source is not H2. |
| 46 | |
| 47 | --chunkSize:: |
| 48 | Chunk size of fetching from source and pushing to target on each time. |
| 49 | Defaults to 100000. |
| 50 | |
| 51 | == CONTEXT |
| 52 | This command can only be run on a server which has direct |
| 53 | connectivity to the database. |
| 54 | |
| 55 | == EXAMPLES |
| 56 | To migrate from H2 to the database specified by |
| 57 | link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
| 58 | in gerrit.config: |
| 59 | |
| 60 | ---- |
Gert van Dijk | 0c25d46 | 2017-10-19 22:57:25 +0200 | [diff] [blame] | 61 | $ java -jar gerrit.war MigrateAccountPatchReviewDb -d site_path |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 62 | ---- |
| 63 | |
| 64 | == SEE ALSO |
| 65 | |
| 66 | * Configuration parameter link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
| 67 | |
| 68 | GERRIT |
| 69 | ------ |
| 70 | Part of link:index.html[Gerrit Code Review] |
| 71 | |
| 72 | SEARCHBOX |
| 73 | --------- |