blob: 64a10084a8f0866bb5621a4fefeac9f2b53ec78c [file] [log] [blame]
Marian Harbachebeb1542019-12-13 10:42:46 +01001:linkattrs:
Hongkai Liu49799b22017-04-07 16:54:25 -04002= MigrateAccountPatchReviewDb
3
4== NAME
Gert van Dijk0c25d462017-10-19 22:57:25 +02005MigrateAccountPatchReviewDb - Migrates AccountPatchReviewDb from one database
Hongkai Liu49799b22017-04-07 16:54:25 -04006backend 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
17Migrates AccountPatchReviewDb from one database backend to another. The
18AccountPatchReviewDb is a database used to store the user file reviewed flags.
19
David Pursehouse6cd0a792017-04-26 11:40:48 +020020This command is only intended to be run if the configuration parameter
Hongkai Liu49799b22017-04-07 16:54:25 -040021link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
22is set or changed.
23
24To migrate AccountPatchReviewDb:
25
26* Stop Gerrit
27* Configure new value for link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
David Pursehouse6cd0a792017-04-26 11:40:48 +020028* Migrate data using this command
Hongkai Liu49799b22017-04-07 16:54:25 -040029* Start Gerrit
30
Saša Živkov1abb73e2018-02-15 11:51:51 +010031[NOTE]
32When using MySQL, the file_name column length in the account_patch_reviews table will be shortened
33from the standard 4096 characters down to 255 characters. This is due to a
Marian Harbach34253372019-12-10 18:01:31 +010034link:https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html[MySQL limitation,role=external,window=_blank]
Saša Živkov1abb73e2018-02-15 11:51:51 +010035on the max size of 767 bytes for each column in an index.
36
Hongkai Liu49799b22017-04-07 16:54:25 -040037== OPTIONS
38
39-d::
Gert van Dijk0c25d462017-10-19 22:57:25 +020040--site-path::
41 Location of the `gerrit.config` file, and all other per-site
42 configuration data, supporting libraries and log files.
43
Hongkai Liu49799b22017-04-07 16:54:25 -040044--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
52This command can only be run on a server which has direct
53connectivity to the database.
54
55== EXAMPLES
56To migrate from H2 to the database specified by
57link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
58in gerrit.config:
59
60----
Gert van Dijk0c25d462017-10-19 22:57:25 +020061 $ java -jar gerrit.war MigrateAccountPatchReviewDb -d site_path
Hongkai Liu49799b22017-04-07 16:54:25 -040062----
63
64== SEE ALSO
65
66* Configuration parameter link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
67
68GERRIT
69------
70Part of link:index.html[Gerrit Code Review]
71
72SEARCHBOX
73---------