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.
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 4 | In version 5 |
|---|---|
Event files (.csv, .xlsx) in events/ | Imported as they are. See Your event files. |
Accounts in settings.yaml | Declared 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_* variables | Not read. Settings live in the app, under Settings. |
| Price history in InfluxDB | Downloaded again from scratch. |
| Grafana dashboards | Replaced 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
- Leave version 4 running to compare the figures.
- Copy your version 4 configuration directory somewhere safe. In the Compose
set-up it is
data/next todocker-compose.yaml, or whateverSB_CONFIG_DIRnames. It holds your event files andsettings.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
- 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.
- Open http://localhost:8080. On the first screen, choose the currency your version 4 amounts are written in. You cannot change it afterwards.
- On the account step, create your first account. If version 4 declared
accounts, use the
idof one of them as Identifier. - Declare your other accounts. See Your accounts.
- Import your event files one by one. See Your event files.
- Wait for the price history to download. See Rebuild and resolution.
- Compare the two versions. See The reconciliation.
- 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.
- Open Ledger and select Import.
- Choose a file from your copy of
events/. - Under Import into, choose an account. Lines with an empty
accountcolumn go to it. Lines that name an account keep their own. - 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.
- If the app asks Amounts in another currency, say which currency your broker used for those securities.
- 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:
- Open Accounts and select Add an account.
- In Identifier, type the account's
idfromsettings.yaml, exactly. It cannot be changed afterwards. - In Label, type its
label. - 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:
| Figure | Where to read it in version 5 |
|---|---|
| Quantity held of each security | Shares, column Held · average price |
| Cash balance of each account | Accounts, Cash |
| Net contributions: deposits minus withdrawals | Accounts, 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:
-
List them. Their names end in
sb_influxdb_dataandsb_grafana_data:docker volume ls | grep sb_ -
From your version 4 Compose directory, stop the stack:
docker compose down -
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:
-
In version 5, open Ledger → Export and save All your events as CSV.
-
Put the file in version 4's
events/directory, in place of your old files. -
In version 4's
settings.yaml, declare every account the file'saccountcolumn names,defaultincluded if it appears. Give each one acurrency: version 4 refuses to start without it.settings.yamlaccounts:- id: peatype: PEAcurrency: EURlabel: My PEA -
Start version 4.
Version 4 ignores the extra base_currency column. Only quantities, cash and
net contributions will match version 5.