github.com/decred/politeia@v1.4.0/politeiad/cmd/legacypoliteia/usage.go (about)

     1  // Copyright (c) 2022 The Decred developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  const usageMsg = `legacypoliteia usage:
     8  
     9  Commands
    10    convert  Convert git backend data into tstore backend types.
    11    import   Import the converted data into a tstore backend.
    12  
    13  Command Usage: convert
    14  
    15    $ legacypoliteia convert <gitRepo>
    16  
    17    The convert command parses a legacy git repo, converts the data into types
    18    supported by the tstore backend, then writes the converted JSON data to disk.
    19    This data can be imported into tstore using the 'import' command.
    20  
    21    Arguments:
    22  
    23    1. gitRepo   (string)  Path to the legacy git repo.
    24  
    25    Flags:
    26  
    27    --legacydir  (string)  Path to directory that the JSON data will be written
    28                           to. The directory does not need to exist.
    29                           (default: ./legacy-politeia-data)
    30  
    31    --token      (string)  Specify a single token whose contents will be
    32                           converted and saved to disk. (default: "")
    33  
    34    --overwrite    (bool)  The conversion command will skip over a legacy
    35                           proposal if it is found in the legacydir, indicating
    36                           that it has already been converted. This flag
    37                           overrides that default behavior and performs the
    38                           conversion work again. The existing converted
    39                           proposal in the legacydir will be overwritten.
    40                           (default: false)
    41  
    42  Command Usage: import
    43  
    44    $ legacypoliteia import <legacyDir>
    45  
    46    Import the JSON output from the 'convert' command into tstore. The user must
    47    rebuild the politeiad caches after the data is successfully imported. This is
    48    done by restarting politeiad with the --fsck flag.
    49  
    50    Arguments:
    51  
    52    1. legacyDir  (string)  Path to the directory that contains the converted
    53                            legacy JSON data. This directory is written to disk
    54                            during the execution of the 'convert' command.
    55    Flags:
    56  
    57    --tloghost    (string)  Host for tlog. (default: localhost:8090)
    58  
    59    --dbhost      (string)  Host for mysql db. (default: localhost:3306)
    60  
    61    --dbpass      (string)  Password for mysql politeiad user.
    62                            (default: politeiadpass)
    63  
    64    --testnet     (bool)    Use the testnet database. (default: false)
    65  
    66    --token      (string)  Specify a single legacy token whose contents will be
    67                           imported. This is helpful during testing.
    68                           (default: "")
    69  
    70    --stubusers  (bool)    Create user stubs in the politeiawww user database
    71                           that correspond to the user IDs of all imported
    72                           proposals. This allows you to import mainnet Politeia
    73                           data locally for testing purposes. Faliure to create
    74                           user stubs will result in politeiawww throwing 'user
    75                           not found' errors when attempting to retrieve the
    76                           imported proposal data using the standard politeiawww
    77                           API. (default: false)`