blob: c8ab19380c83c24bb36c5273c0d2b3d52f0bcf5b [file] [log] [blame]
Hongkai Liu49799b22017-04-07 16:54:25 -04001= MigrateAccountPatchReviewDb
2
3== NAME
Gert van Dijk0c25d462017-10-19 22:57:25 +02004MigrateAccountPatchReviewDb - Migrates AccountPatchReviewDb from one database
Hongkai Liu49799b22017-04-07 16:54:25 -04005backend to another.
6
7== SYNOPSIS
8[verse]
9--
10_java_ -jar gerrit.war MigrateAccountPatchReviewDb
11 -d <SITE_PATH>
12 [--sourceUrl] [--chunkSize]
13--
14
15== DESCRIPTION
16Migrates AccountPatchReviewDb from one database backend to another. The
17AccountPatchReviewDb is a database used to store the user file reviewed flags.
18
David Pursehouse6cd0a792017-04-26 11:40:48 +020019This command is only intended to be run if the configuration parameter
Hongkai Liu49799b22017-04-07 16:54:25 -040020link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
21is set or changed.
22
23To migrate AccountPatchReviewDb:
24
25* Stop Gerrit
26* Configure new value for link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
David Pursehouse6cd0a792017-04-26 11:40:48 +020027* Migrate data using this command
Hongkai Liu49799b22017-04-07 16:54:25 -040028* Start Gerrit
29
Saša Živkov1abb73e2018-02-15 11:51:51 +010030[NOTE]
31When using MySQL, the file_name column length in the account_patch_reviews table will be shortened
32from the standard 4096 characters down to 255 characters. This is due to a
33link:https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html[MySQL limitation]
34on the max size of 767 bytes for each column in an index.
35
Hongkai Liu49799b22017-04-07 16:54:25 -040036== OPTIONS
37
38-d::
Gert van Dijk0c25d462017-10-19 22:57:25 +020039--site-path::
40 Location of the `gerrit.config` file, and all other per-site
41 configuration data, supporting libraries and log files.
42
Hongkai Liu49799b22017-04-07 16:54:25 -040043--sourceUrl::
44 Url of source database. Only need to be specified if the source is not H2.
45
46--chunkSize::
47 Chunk size of fetching from source and pushing to target on each time.
48 Defaults to 100000.
49
50== CONTEXT
51This command can only be run on a server which has direct
52connectivity to the database.
53
54== EXAMPLES
55To migrate from H2 to the database specified by
56link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
57in gerrit.config:
58
59----
Gert van Dijk0c25d462017-10-19 22:57:25 +020060 $ java -jar gerrit.war MigrateAccountPatchReviewDb -d site_path
Hongkai Liu49799b22017-04-07 16:54:25 -040061----
62
63== SEE ALSO
64
65* Configuration parameter link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url]
66
67GERRIT
68------
69Part of link:index.html[Gerrit Code Review]
70
71SEARCHBOX
72---------