আপডেট ও ব্যাকআপ
এই অধ্যায়টি এখনও অনুবাদ হয়নি, তাই ইংরেজিতে দেখানো হচ্ছে।
এই পাতায়
From version 1.7.0 on, Admin → Updates installs a new version with one button: it takes a backup, puts the new files in place, updates the database and checks that the site still answers. A site on an older version is updated by hand once (see below); after that the panel does it.
The Updates page
The Version box shows the version Running here, the Newest version, when it was Released, when the site Looked for news and the Last update. The badge at the top says Up to date, Version … is available or Updating….
Look for a new version asks the License Center at once. The site also looks every three hours through the cron job, and the bell rings when a version is out. Updates need a licence in order.
When a version is out, What changed in … lists its notes, each marked Added, Fixed, Changed and so on. Every version, on faruk.bd opens the full changelog.
Installing an update
Press Back up and update to … and confirm. The page shows each step as it goes:
- Fetching the package from the License Center, compared with the size and SHA-256 checksum of the release. A package that does not match is never used.
- Checking the package: it must be AIO Downloader, newer than the running version, and fit for this PHP.
- Backing up the database.
- Backing up the files.
- Putting the new files in place. For these few seconds visitors see Back in a moment; the page reloads by itself.
- Updating the database.
- Checking that the site answers: the server asks for the home page and the sign-in page of the panel. A page that answers with an error puts the backup back by itself.
Keep the page open; it shows the rescue address of the backup while it works. At the end you see Updated from … to …, or The update … did not go through with the reason and what became of the site: Nothing of the site was changed, The backup was put back by itself, or The backup could not be put back by itself (then use Restore or the rescue address). What happened, step by step shows the full record.
If the button is greyed out, a red box says why: the PHP zip extension is missing, a folder or file of the script cannot be written by PHP (folders 755, files 644, the owner must be the account of the website), or less than 120 MB are free on the disk. Until that is fixed, update by hand.
What an update never touches
config.php, installed.lock, install.php, everything in uploads/, everything in storage/ (except storage/.htaccess and the certificate list storage/cacert.pem), and an .htaccess that is already there, because hosting panels write the PHP version into it. rollback.php is replaced only after the new version has shown that it runs. Plugins, themes and modules that come with the script are part of the package and are updated with it.
Automatic updates
The box How new versions arrive has two choices:
- By hand (the default): the bell rings, you read what changed and press the button.
- Automatic: the cron job installs a new version by itself, with a backup first. It writes to the address under Settings → E-mail → Send notices to before the new files go in (with the rescue address) and when it is done.
A version that fails is put back and waits for your press on the button; saving this box again allows another automatic try. Automatic updates need working scheduled jobs; the page warns you when they are not running.
Backups
A backup is taken before every update, and Back up now takes one at any time. Each lives in its own folder in storage/backups/ (closed to the web) and holds:
files.zip: every file of the script,config.phpincluded.uploads/comes along while it is smaller than 100 MB.database.sql.gz(ordatabase.sql): every table of the site.manifest.json: what the backup is about, and the files an update was going to add.RESCUE.txt: the rescue address of this backup.
The list shows when each was taken, the version, what it holds and its size. The ⋯ menu has Download the files, Download the database and Delete.
Backups to keep (1 to 20, 3 by default) decides how many finished backups stay; older ones are removed by themselves. A backup that was never finished is removed after a day.
Restore
Restore on a backup offers two ways:
- The files only: the script goes back to the version of the backup and the files an update added are removed. Settings, pages, members and today's downloads stay as they are. The right choice nearly always.
- The files and the database: everything exactly as it was then. Whatever was saved since is lost.
Restore is not possible while an update is at work.
Install from a ZIP file
For a server that cannot reach the License Center, or a version you were sent by hand: choose the update ZIP (AIO-Downloader-v…-update.zip, from your account on license.faruk.bd) and press Back up and install this ZIP. The same steps run, without the download. The full package, plugin ZIPs and older versions are refused. When the ZIP is larger than the server takes in an upload, raise upload_max_filesize or update by hand.
Updating by hand (FTP)
This always works, also on a site older than 1.7.0.
- Take a backup (Back up now, or with your host's tools).
- Download
AIO-Downloader-v…-update.zipfrom your account on license.faruk.bd. It carries noconfig.php,install.php,installed.lockor uploads. - Extract it over the site with the File Manager. It carries the standard
.htaccess: if your host added lines of its own to yours, keep a copy and put them back. - The database follows by itself with the next page view. You can also open
https://your-site/db_update.phpwhile signed in to the panel (or with?key=and the cron secret), or press Update database on Admin → System check. Opening it twice does no harm.
rollback.php: when the panel does not open
Every backup has a rescue key. The address
https://your-site/rollback.php?key=<rescue key>
opens a page with two choices, The files only or The files and the database, and the button Put the backup back. It needs nothing of the script but config.php, so it works when everything else is broken.
You find the address on the Updates page while an update runs, in the e-mail sent before an automatic update, and in storage/backups/<backup>/RESCUE.txt (open it with the File Manager or FTP).
The watchdog
While the new files have not yet shown that they run, cron.php counts each run that starts. When more than three runs began, the update never got through, and fifteen minutes have passed since the files were put in place, it puts the backup back by itself, files and database. The next run rings the bell (An update was rolled back) and sends you an e-mail. That version then waits for the button.