This is a walkthrough on how to update to the latest and greatest PhantomBot release, without losing any of your data.
Windows / macOS:
You’re going to need the latest version of PhantomBot from here.
Once you have the latest release downloaded you need to extract PhantomBot.
- Windows: Right click the zip file, select extract all.
- MacOS: Double click the zip file.
Find your current PhantomBot installation, the one you’re updating from.
- For standard installations.
- Copy the config folder into the newly extracted PhantomBot folder. (v2.3.9)
* Copy you botlogin.txt and phantombot.db (not the one with journal) file over to the new folder. (v2.3.8 to v2.3.9)
- For installations with custom language files.
- Copy only your modified/custom files over to the new PhantomBot folder.
Launch your new PhantomBot. You can keep your old PhantomBot folder as a backup for the future.
1. Stop your PhantomBot:
First switch to your botuser:
sudo su - botuser
Then run this:
kill $(pgrep -f PhantomBot)
or if you have it, use:
sudo systemctl stop phantombot
Wait 20 seconds and check if your PhantomBot is not running:
ps -ef | grep PhantomBot
2. Update PhantomBot:
Switch to the home directory:
Rename the old folder:
mv phantombot phantombot-old
Get the latest PhantomBot release:
Replace the X with the current release version like PhantomBot-2.3.5.zip!
After the download has finished, we have to unzip the files.
To make future updates a bit easier, we have to rename the PhantomBot folder.
mv PhantomBot-X.X.X phantombot
Copy phantombot.db and botlogin.txt to your new folder:
cp -R ./phantombot-old/config/ ./phantombot/ (v2.3.9)
Do not copy your database or botlogin into the config folder, the bot will do this for you.
cp ./phantombot-old/phantombot.db ./phantombot/ (v2.3.8 to v2.3.9)
cp ./phantombot-old/botlogin.txt ./phantombot/ (v2.3.8 to v2.3.9)
For installations with custom language files, scripts or sound effects: Copy only your modified/custom files over to the new PhantomBot folder.
The last thing we need to do is to assign the right privileges to make the launch.sh and launch-service.sh files executable.
chmod u+x launch-service.sh launch.sh
Now we are ready to launch PhantomBot again. You can run the bot with:
sudo systemctl start phantombot