Skip to main content
Version: v5

Coming from v4

This page moves a SuiviBourse 4 installation to version 5. You install version 5 next to version 4, hand it your event files, and compare the two before you remove version 4.

Version 5.3 is the last to recognise version 4 files

From version 5.4, the app stops checking for version 4 files and variables: it no longer warns about a mounted config.yaml or settings.yaml, and no longer refuses them at import. Event files in the version 4 columns still import. Move from version 4 with 5.3 or earlier.

What carries over​

Version 5 has no upgrade command and never reads version 4's directories or databases.

Version 4In version 5
Event files (.csv, .xlsx) in events/Imported as they are. See Your event files.
Accounts in settings.yamlDeclared again in the app. See Your accounts.
config.yaml (manual mode, positions without dates)Not read. Record those positions as dated events.
settings.yaml and the SB_* variablesNot read. Settings live in the app, under Settings.
Price history in InfluxDBDownloaded again from scratch.
Grafana dashboardsReplaced by the app's own pages.

The image has a new name. Version 4 is ghcr.io/pbrissaud/suivi-bourse-app. Version 5 is ghcr.io/pbrissaud/suivi-bourse.

Before you start​

  1. Leave version 4 running to compare the figures.
  2. Copy your version 4 configuration directory somewhere safe. In the Compose set-up it is data/ next to docker-compose.yaml, or whatever SB_CONFIG_DIR names. It holds your event files and settings.yaml.

Never mount that directory into version 5, nor share a volume between the two. If mounted, version 5 logs that it ignores settings.yaml or config.yaml.

The steps​

  1. Start version 5 on a new volume, as in Install with Docker. Version 4 does not use port 8080, so both can run at once.
  2. Open http://localhost:8080. On the first screen, choose the currency your version 4 amounts are written in. You cannot change it afterwards.
  3. On the account step, create your first account. If version 4 declared accounts, use the id of one of them as Identifier.
  4. Declare your other accounts. See Your accounts.
  5. Import your event files one by one. See Your event files.
  6. Wait for the price history to download. See Rebuild and resolution.
  7. Compare the two versions. See The reconciliation.
  8. When the figures agree, stop version 4 and remove its volumes. See Remove version 4.

Your event files​

Version 5 reads the columns version 4 wrote: date, event_type, symbol, name, quantity, unit_price, fee, amount, notes and account. The six event types are the same. Both .csv and .xlsx work, and every sheet of a workbook is read.

  1. Open Ledger and select Import.
  2. Choose a file from your copy of events/.
  3. Under Import into, choose an account. Lines with an empty account column go to it. Lines that name an account keep their own.
  4. Read the preview. Each line is New, Already present, Unknown security or Unreadable. A line that names an account you have not declared is Unreadable and is not written.
  5. If the app asks Amounts in another currency, say which currency your broker used for those securities.
  6. Select Import n events to write the new lines.

Repeat for each file. Lines already imported show as Already present and are skipped. See Import your events for the full preview.

Your accounts​

If your version 4 settings.yaml had no accounts: block, your files have an empty account column. Import them into any account you created in step 3.

If it had one, declare each account before you import:

  1. Open Accounts and select Add an account.
  2. In Identifier, type the account's id from settings.yaml, exactly. It cannot be changed afterwards.
  3. In Label, type its label.
  4. Select Add.

Version 5 has no field for type or currency. The currency chosen at the first launch applies to every account. To keep the type, put it in the label.

The reconciliation​

Once the import is done, compare these figures, per account and in total. They must match version 4:

FigureWhere to read it in version 5
Quantity held of each securityShares, column Held · average price
Cash balance of each accountAccounts, Cash
Net contributions: deposits minus withdrawalsAccounts, Net contributed

If one differs, look for a file imported into the wrong account, or a line marked Unreadable.

Expect gains and returns to differ. Version 5 computes them with its own rules: see Read your figures.

A free share (GRANT) counts at the unit_price on its row, or zero without one. Prices are downloaded again, with fewer points for older dates.

Remove version 4​

Version 5 never touches version 4's InfluxDB and Grafana volumes. Remove them yourself once you are sure:

  1. List them. Their names end in sb_influxdb_data and sb_grafana_data:

    docker volume ls | grep sb_
  2. From your version 4 Compose directory, stop the stack:

    docker compose down
  3. Remove both volumes, with the names the list showed:

    docker volume rm suivi-bourse_sb_influxdb_data suivi-bourse_sb_grafana_data

Keep your copy of the configuration directory to be able to go back.

Go back to version 4​

Your version 4 files are never changed, so going back right after the move costs nothing: start version 4 again. To keep what you recorded in version 5 since:

  1. In version 5, open Ledger → Export and save All your events as CSV.

  2. Put the file in version 4's events/ directory, in place of your old files.

  3. In version 4's settings.yaml, declare every account the file's account column names, default included if it appears. Give each one a currency: version 4 refuses to start without it.

    settings.yaml
    accounts:
    - id: pea
    type: PEA
    currency: EUR
    label: My PEA
  4. Start version 4.

Version 4 ignores the extra base_currency column. Only quantities, cash and net contributions will match version 5.