-
Notifications
You must be signed in to change notification settings - Fork 11
Recovery System
The Recovery System is a special service by HyperUBot. It should help the user to be able to recover the userbot from backups or generating new backups to be on the safe side. It's also responsible to apply new updates for HyperUBot. This page will explain the usage and the options the Recovery System does offer.
Do not delete the Recovery System. This will break the update mechanism of HyperUBot!
To start into the Recovery System, locate to HyperUBot's directory and execute the following command:
-
POSIX systems:
python3 recovery.py
(orpython3.8 recovery.py
on some distros) -
Windows:
python recovery.py
There are some options such as start options to HyperUBot, applying updates manually or reinstall the whole userbot.
This option will start HyperUBot normally without any special argument.
Note: not suppported by Windows
This option will start HyperUBot into safemode. Safmode is a special start which disables all user modules. Useful to remove broken modules without getting spammed with errors.
Note: not suppported by Windows
Clears the generated cpython caches in HyperUBot. Useful to remove leftovers from deleted modules.
The Recovery System also offers an option to apply bot updates manually. To do so, you need to get update.zip
, it's rules.py
and create the required directory manually before you start the recovery.
Locate to HyperUBot's directory and execute the following commands in your terminal:
mkdir releases
curl -H "Accept: application/json" https://api.github.com/repos/prototype74/HyperUBot/releases/latest | grep '"zipball_url"' | cut -d '"' -f4 | wget --output-document=releases/update.zip -i -
curl -H "Accept: application/json" https://api.github.com/repos/prototype74/HyperUBot/releases/latest | grep '"browser_download_url"' | cut -d '"' -f4 | wget --output-document=releases/rules.py -i -
Check in releases directory if update.zip
and rules.py
exists or if the file sizes are not zero. Simply check it by executing ls -l releases
in your terminal.
- Locate to HyperUBot's directory and create a folder named
releases
- Open the link https://api.github.com/repos/prototype74/HyperUBot/releases/latest in your browser (make sure your browser supports JSON)
- Search for
zipball_url
it should be at the bottom of the site. Click on the link, it will download the ZIP file - Search for
browser_download_url
it should be at the bottom of the site but beforezipball_url
. Click on the link, it will download therules.py
file - Rename the downloaded ZIP file to
update.zip
move theupdate.zip
andrules.py
to thereleases
folder in HyperUBot's directory
The stucture should be now like this:
HyperUBot\releases\rules.py
HyperUBot\releases\update.zip
If so check in releases directory if update.zip
and rules.py
exists or if the file sizes are not zero.
Go to the Releases section of HyperUBot's repository. To the left side bar (mobile version: on top) there is the commit ID below (mobile version: it's next to) the tag version e.g. 6f9bda6
(v5.0.2 release). Copy it, you will need this ID to apply the recently downloaded update.
- Start the Recovery System now
- Select
Apply update
option - Input the commit ID
- Wait for the Recovery to finish the update
That's it! It's definitely more complex than the automatic way, the Updater module usually do. So apply update manually only if it's actually necessary.
This will backup the current installed version. Generated backups are stored a backup
folder in HyperUBot's directory. If a backup with the same version does exist already, the Recovery System will overwrite the old backup archive.
Lists generated backups and restores the selected backup archive.
Warning: performing a restore CANNOT be undone!
This option will delete all downloaded user modules, the configurations including the string session and any other data in HyperUBot's directory. At last, the latest release will be installed automatically and you have to setup everything again
Warning: this process CANNOT be undone!
It may be possible that the Recovery System does display information on top of the Main menu (colored).
Some options will be colored to yellow, it's just a warning that these options can break the git history of your git repository. If you take changes in the source then you shouldn't ignore this warning.
Similar to Directory is a local git repository
the only difference is the Recovery System wasn't able to detect the actually git history but detected an initialized .git
folder.
Displays the current installed version. If it's Unknown
it could be possible that HyperUBot isn't installed at all, installed but broken or an older version is installed.
This means as it is mentioned above, the userbot isn't installed and many options will be disabled. This could happen after a failed update or due to other reasons that made the userbot
directory unusable. The possible options are to restore a backup or in worst case reinstalling the userbot.
HyperUBot - A customizable, modular Telegram userbot, with innovative components.
Copyright © 2020-2023 nunopenim & prototype74, licensed under PEL