This script rewrites project configurations to take into account
various structural changes in the configuration object.
The script can be run without arguments, in which case it will
upgrade the configuration of every project found in the local
database, or one or more project IDs can be given as command
line arguments in order to upgrade only those projects.
Configurations that have already been upgraded will not be
touched.
For other projects, both the original and new configurations will
be saved to file in the current directory, as well as two scripts:
one commits the new configuration to the server, and the other
restores the original one.
This script connects directly to the database, using the same
mechanisms as the Dougal server. It is recommended to run it
locally on the server host.
The restore scripts use the HTTP API, which they expect to find
on http://localhost:3000/api, so it is also recommended to run
them in the local server.
Closes#290.
Closes#291.
Closes#292.
Closes#293.
Closes#294.
Closes#295.
Closes#296.
Closes#297.
Closes#298.
Fixes#275.
Use this as the systemd unit file to run as a service:
[Unit]
Description=Dougal Network Packet Capture
After=network.target remote-fs.target nss-lookup.target
[Service]
ExecStart=/srv/dougal/software/sbin/packet-capture.sh
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always
User=root
Group=users
Environment=PATH=/usr/bin:/usr/sbin:/usr/local/bin
Environment=INS_HOST=172.31.10.254
WorkingDirectory=/srv/dougal/software/var/
SyslogIdentifier=dougal.pcap
[Install]
WantedBy=multi-user.target
The idea is to capture incoming real-time data to be able to
replay it later on development systems, e.g., for new development
or troubleshooting.
Issue #230.
The database upgrade script is updated to export
also user-entered data stored in columns of tables
containing also derived data, and to re-import
everything after the upgrade.