Please note: There is no need to install a new instance of DualShield on the new machine, as this process will do this automatically!
On the existing machine
- Stop services
sudo systemctl stop dualshield sudo systemctl stop dualsql
- Create a working directory
mkdir dualshield-files
- Enter the working directory
cd dualshield-files
- Compress the whole installation folder
sudo tar -C /opt -czf dualshield.tar.gz dualshield
- At this stage, it is strongly recommended you check where the service scripts are located
- Run the following command
ls /etc/init.d/ | grep -i dual
- If 'dualshield' and 'dualsql' appear in the output, then copy the SysV services scripts as follows
cp /etc/init.d/dualshield . cp /etc/init.d/dualsql .
- If 'dualshield' and 'dualsql' do not exist under /etc/init.d then copy the following systemd service script instead
cp /usr/lib/systemd/system/dualshield.service . cp /usr/lib/systemd/system/dualsql.service .
- Copy all files to the new machine
scp -r /path/to/dualshield-files someuser@remote.server:/somepath/
On the new machine- Enter the working directory
cd dualshield-files
- Extract dualshield folder
sudo tar -xzvf dualshield.tar.gz -C /opt/
- If Systemd (see above) Copy the following Service service script
sudo cp dualshield.service /usr/lib/systemd/system/ sudo cp dualsql.service /usr/lib/systemd/system/
- Register services
sudo systemctl enable dualshield.service sudo systemctl enable dualsql.service
- If SysV (see above) Copy the following service script
sudo cp dualshield /etc/init.d sudo cp dualsql /etc/init.d
- You will need to also register the SysV services
sudo update-rc.d dualsql defaults 88 sudo update-rc.d dualshield defaults 89
- Create
dualshielduser
sudo useradd -g dualshield -s /sbin/nologin dualshield
- Change dualshield directory owner
sudo chown -R dualshield:dualshield /opt/dualshield
- Add host file entries
(replacedualshield.fqdn.comwith your actual dualshield fqdn)
sudo echo "127.0.0.1 dualshield.fqdn.com" >> /etc/hosts sudo echo "127.0.0.1 $(hostname)" >> /etc/hosts
- Start services if systemd
sudo systemctl start dualsql sudo systemctl start dualshield
- Start services if SysV
sudo /etc/init.d/dualsql start sudo /etc/init.d/dualshield start