# Importing legacy data

In almost all cases, legacy data import will require writing custom code to deal with your particular legacy data. The example scripts here will probably not work "out-of-the-box", and are provided as a starting point only.
Some import scripts may require installation of the Array-PrintCols and Term-Query (make test broken; install manually) modules.

- bin/bind.import - Import domain information from BIND named
- bin/passwd.import - Just import `passwd' and `shadow' or `master.passwd', no RADIUS import.
- bin/svc_acct.import - Import `passwd', ( `shadow' or `master.passwd' ) and RADIUS `users'. Before running bin/svc_acct.import, you need services (with table svc_acct) as follows:
  - Most accounts probably have entries in passwd and users (with Port-Limit nonexistant or 1)
  - Some accounts have entries in passwd and users, but with Port-Limit 2 (or more)
  - Some accounts might have entries in users only (Port-Limit 1)
  - Some accounts might have entries in users only (Port-Limit >= 2)
  - POP mail accounts have entries in passwd only, and have a particular shell.
  - Everything else in passwd is a shell account.
- Importing customer data
  - Manually
    - Add a new customer
    - Add one or more packages for this customer
    - Enter a package by clicking on the package number
    - Pick the `Link to existing' option
  - Batch - You will need to write a script to import your particular legacy data. You can use eg/TEMPLATE_cust_main.import as a starting point.