Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:dpi:dpi_components:platform:dpi_admin:admin_db:start [2024/05/07 06:07] – atereschenko | en:dpi:dpi_components:platform:dpi_admin:admin_db:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Database administration ====== | ||
| - | {{indexmenu_n> | ||
| - | UDR (built-in database, user data repository) is used for permanent storage of data on services and policing settings for the subscribers. | ||
| - | |||
| - | **List of database tables** | ||
| - | |||
| - | ^ Table ^ Purpose ^ | ||
| - | |bindings| login and address binding| | ||
| - | |bindings_multi| login and address binding for multu-subscribers (with several IPs)| | ||
| - | |policing| Subscriber policing setting| | ||
| - | |profile_names| Names of profiles| | ||
| - | |profiles| Profiles of services and policing| | ||
| - | |services| Subscriber services setting| | ||
| - | |vchannel_policing| Channel policing setting| | ||
| - | |ip_props| BRAS subscriber properties| | ||
| - | |||
| - | ==== Activating the built-in database ==== | ||
| - | |||
| - | <note important> | ||
| - | |||
| - | UDR is activated by the configuration parameter in **/// | ||
| - | |||
| - | < | ||
| - | |||
| - | The created database is located in the **/// | ||
| - | |||
| - | <note important> | ||
| - | < | ||
| - | and handle further manipulations in the copied database.</ | ||
| - | |||
| - | ==== Enlarging the DB ==== | ||
| - | |||
| - | By default, the database size is limited to 1GB. If you have more than 1 million policing profiles, you will need to increase the default size: | ||
| - | < | ||
| - | will set the DB size of 2GB. | ||
| - | |||
| - | < | ||
| - | |||
| - | ==== Database recovery with data transfer ==== | ||
| - | |||
| - | Stop the fastDPI | ||
| - | < | ||
| - | |||
| - | Run the script | ||
| - | < | ||
| - | rm -rf / | ||
| - | mkdir -p / | ||
| - | for table in $(mdb_dump -l / | ||
| - | mdb_dump -f / | ||
| - | mdb_load -f / | ||
| - | done | ||
| - | rm / | ||
| - | mv / | ||
| - | cp -f / | ||
| - | |||
| - | Start the fastDPI | ||
| - | < | ||
| - | |||
| - | ==== Deleting a database and reloading data back from an external source (billing, etc.) ==== | ||
| - | |||
| - | Stop the fastDPI | ||
| - | < | ||
| - | |||
| - | Delete the DB | ||
| - | < | ||
| - | |||
| - | Start the fastDPI | ||
| - | < | ||
| - | |||
| - | Reload all the settings into the database using own scripts. | ||
| - | |||
| - | ===== Experimental Section ===== | ||
| - | ==== Restoring a database to the fdpi_ctrl command format ==== | ||
| - | |||
| - | Stop the fastDPI | ||
| - | < | ||
| - | |||
| - | Run the script | ||
| - | < | ||
| - | /bin/rm / | ||
| - | |||
| - | Start the fastDPI | ||
| - | < | ||
| - | |||
| - | Run the script | ||
| - | < | ||
| - | ./ | ||
| - | |||
| - | ==== Restoring certain tables to the fdpi_ctrl command format ==== | ||
| - | |||
| - | Stop the fastDPI | ||
| - | < | ||
| - | |||
| - | Run the script | ||
| - | < | ||
| - | mdb_dump -p -f dump.$table.sh -s $table /var/db/dpi | ||
| - | done | ||
| - | /bin/rm / | ||
| - | |||
| - | Start the fastDPI | ||
| - | < | ||
| - | |||
| - | Choose and run the scripts you need, **for example** | ||
| - | < | ||
| - | ./ | ||