Installation | Topics | Beyond Lino
How to import legacy data from TIM to Lino¶
Overview¶
Create a user account for the TIM user on the Lino server.
Generate a SSH key pair for the TIM server (see How to generate an SSH key pair) and add its public key to the
~/.ssh/authorized_keys
file of the Lino server.Write a script that uploads the TIM data to the Lino server. A typical rsync command:
rsync /mnt/c/tim/data xxxx@yyy.mylino.net:~/timdata
Install the script as a cron job so that it runs automatically every day.
Start a new Lino site running Lino Così or Lino Noi, with these settings:
def get_installed_plugins(self): yield super().get_installed_plugins() yield 'lino_xl.lib.tim2lino' def get_plugin_configs(self): yield ('tim2lino', 'languages', 'de fr') # yield ('tim2lino', 'legacy_data_path', self.site.project_dir / 'timdata') yield ('vat', 'declaration_plugin', 'lino_xl.lib.bevat') yield ('help', 'make_help_pages', True) yield ('linod', 'use_channels', True) yield ('linod', 'daemon_user', 'tim') yield ('notify', 'use_push_api', True) yield ('periods', 'start_year', 2022) yield ('users', 'demo_password', "My strong password") yield ('weasyprint', 'margin_left', 50) yield ('peppol', 'supplier_id', '123e4567-4567-4654-3214-c4b232209697') yield ('peppol', 'onboarding_date', 20250301) yield super().get_plugin_configs()
Manual steps to perform after each
pm prep
:pm checkdata -pf
set site_owner
create journal INB as a copy of EKR
set is_outbound for sales journal
set send_peppol checkboxes on customers.
On the Lino site, install a daily
cron
job that loads the timdata:cd /usr/local/lino/lino_local/xxxx . env/bin/activate python manage.py loaddata tim2lino
Installing rsync on Windows¶
There are two approaches to install rsync on a Windows machine:
We recommend the former if possible.
Using Windows Subsystem for Linux (WSL)¶
Install the feature as explained e.g. by microsoft.com. In summary you just open a command-line prompt and say:
C:\Users\joe> wsl --install
It asks you to enter a name and password for the default user account.
Once in a WSL shell you need to install the ssh and rsync packages:
$ sudo apt-get update $ sudo apt-get install ssh rsync
The content of
C:TIM
drive is visible as/mnt/c/tim
. Create two files in this directory:An executable file
tim2lino.sh
as follows:#!/usr/bin/bash OPTS="-a --verbose --delete --delete-excluded --delete-during --times" rsync $OPTS /mnt/c/tim/data xxx@yyy.mylino.net:~/timdata
A file
tim2lino.bat
as follows:@echo off wsl --exec /mnt/c/tim/tim2lino.sh pause
On the Windows Desktop, add a shortcut to
C:timtim2lino.bat
.