Overview of the jDownloads Tools

Introduction



jDownloads has a set of 12 Tools as shown opposite that assist in various ways.

They maybe considered in sets:

1. Backup & Backup Restoration
2. Options Export, Import and Reset
3. Install Sample Data
4. Reset Downloads Counters
5. Reset Categories and Downloads Permissions
6.Clean up the Image and Preview File Folders
7. Batch Processing Lock (this is the 'blank' one at the end of the list).
tools01

Backup & Backup Restore

The Backup is of the jD database tables.  After clicking on 'Backup' you are taken to a new screen with explanatiory text and a
create backup button button which will start the backup.  There is also a back button button that returns to the list of Tools.

There is only one option which is to include or not the data logs.  The  log file concerned is only required when,in the User Group Settings, you have defined downloading limits in the Limits tab and also in the Group Settings tab you have set the option 'View User Limits' is set to Yes. For more information about User Limits click on Setting User Limits (opens in a separate window/tab).

After clicking on the Create backup File button jD will generate a txt file whose name is formed from thetext 'backup', the version of jDownloads and the date and time for saving on your device.  An example file would be "backup_jdownloads_v3.9.8_date_2021-07-15_13 41 49_.txt".

It contains the data base entries for Categories, Downloads, Licenses, Layouts, Logs (if selected), User Groups Settings and the Permission settings.
After clicking on the Restore Backup tool you are taken to a page with a browse button to allow selecting the relevant file. Then click on the restore button button you will be asked "Are you sure?.  Select OK to continue or Cancel to abort. 

After the restore has completed there will be a message such as

"188 datasets saved. The Restore was successfully executed. See restore information in log file: Restore Log."

If you go to the jD Control panel and click on the Restore Logs tab you will see an entry such as shown opposite.

Restore log

Options Export, Import and Reset

Export Options

Options Export is a copy of all the jDownload Options as set in the Options Button button on the jDownloads Control Panel.  After clicking on 'Backup' you are taken to a new screen with explanatiory text and an options export button button which will start the export.  There is also a back button button that returns to the list of Tools.

There is only one option which is to include or not the data logs.  The  log file concerned is only required when,in the User Group Settings, you have defined downloading limits in the Limits tab and also in the Group Settings tab you have set the option 'View User Limits' is set to Yes. For more information about User Limits click on Setting User Limits (opens in a separate window/tab).

After clicking on the Create backup File button jD will generate a txt file whose name is formed from the text 'backup', the version of jDownloads and the date and time for saving on your device.  An example file would be "backup_jdownloads_v3.9.8_date_2021-07-15_13 41 49_.txt".

Import Options

After clicking on the Options Import tool you are taken to a page with a browse button, browse button, to allow selecting the relevant file. After browsing for the file then click on the restore button button.

You will be asked "Are you sure?.  Select OK to continue or Cancel to abort.

After a successful import you are taken to jDownloads Control Panel and should see a message such as shown opposite.

options import msg

If there is an error you should see a message such as shown opposite.
options import msg

Reset Options

Reset Options is setting the Options to their original settings when jDownloads was installed or updated.  After clicking on options reset main you are taken to a new screen with explanatiory text and another create backup button button which will actually start the reset.  There is also a back button button that returns to the list of Tools.

After initiating the restore an 'Are you sure?' popup message will appear.  Click OK to continue.

On completion you will see a message such as options reset done msg.

Install Sample Data


After clicking on Example button a main category, a sub category and a Download are created as illustrated opposite.


Example categoryExample download

Reset Downloads Counters

Clicking on Reset Counters will reset all Download counters to zero immediatley.  There are no further questions!
That is if the number of times Downloaded was Download count before after the reset it will be zero Download count after.  You cannot undo this reset.

Reset Permissions

These two tools, Reset cats perms and Reset Downloads perms,  respectively reset the permisions of all jDownloads Categories and all Downloads to 'inherited'. They start immediately when clicked.  There is no recovery except to once again set the permissions as required.


In this example suppose we are setting up the permissions for a User Group that will be able to Create and Edit Permissions in the Frontend.

The usual way of setting up permissions is to set them as shown opposite on a top level Category.

Initial Category PermissionsCat perms beforeInitial Download PermissionsDownload perms before


The Permisions are then inherited by each of the sub categories which, ultimatley, have the relevant top level category as their parent and then onto the Downloads in all these Categories and sub categories as illustrated opposite.

Note that the Permissions start at the Root or Component Level.  The Reset Permissions Tools do not change any Root permission setting.

Folders tree2


If the Reset Downloads perms button is used then there is no obvious change in the Downloads Permissions.

This is because in the example all the permisions were Inherited.

It is unlikely that we have looked at every individual Download.  If one or more Downloads had been given permissions explicitly these will have been removed and set to 'Inherited'.  We now have a 'clean' set of permissions in the Downloads.

Download Permissions After Downloads ResetDownload perms after
We can now be confident about the Downloads Permission Settings.  If there were any Deny or other permissions set explicitly in a Download, these will have been removed.

Clicking on the Reset cats perms has a signifacant effect as in the example the Create, Edit, Edit State and Edit Own were all set explicitly in each top level Category.

All are now as expected set to 'Inherited' except the Download Permission as that had been set by jDownloads in the Components Permissions.
Categories Permisions After Category ResetCat perms after

Because the Downloads permissions are inherited from their Category then all the permissions to edit and the like in the Front end have been removed.

As with the Categories the Download permissions remain as they are inherited from the Components Permissions, that is they were not set explicitly
Download permsissions after Categories ResetDownload perms after After

Clean up Images and Previews

jDownloads stores all images in the directory images/jdownloads/screenshots.  The corresponding thumbnails are stored in images/jdownloads/screenshots/thumbnails.

Clicking on the clean images button Button will delete all those image files, and the corresponding thumbnail files, that are not linked to any Download.  This situation arrises when a Download is deleted and Options setting in Global Settings - 'Delete images from deleted Downloads' is set  to the default of No.

Preview files, both audio and video, are stored in directory jdownloads/_preview_files.

SimilarlycClicking on the clean previews button Button will delete all those preview files that are not linked to any Download.  This situation arrises when a Download is deleted and Options setting in Global Settings - 'Delete preview files from any deleted Download' is set  to the default of No.

Batch Processing Lock

During batch processing jDownloads sets a "lock" on the relevant database tables so that only one instance at a time may modify the tables.

Whilst the 'batch processing' of categories or downloads is in progress then jDownloads sets a software 'LOCK' to inhibit any changes by other users. If something should cause the batch processing to fail then the 'LOCK' may remain set, thus inhibiting other changes. Attempting to make a change will, after a delay, result in an error message like 'Another batch operation is still in progress. Please try again later'.

To recover from the situation the software 'LOCK' can be reset manually here. It is only clickable whilst the 'LOCK' is set.

ColinM July 2021

Tags: index

Print Email