JEVAPOS AUTOMATIC DATABASE BACKUPS

WINDOWS / XAMPP - ONE-TIME INSTALLATION ON THE SERVER
1. In POS Settings > Backups select the backup folder, preferably outside
   XAMPP and on a separate drive. Enable Automatic Database Backups, select
   Every 1 Hour / Every 2 Hours etc., and save. Configure retention days.
2. Download Windows Schedule Installer on that page.
3. Open PowerShell as Administrator and run:
   powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\Downloads\Install-JevaposBackupSchedule.ps1"
4. Enter the POS folder, e.g. F:\xampp\htdocs\jevapos.com. PHP is detected
   from that XAMPP installation; enter its full path only if detection fails.
5. Check the backup folder and Last Automatic Backup on the POS backup page.

The Windows task checks every five minutes. The POS settings determine when
a backup is actually due. Changing the interval does not require reinstalling
the task. Untick Automatic Database Backups to stop future automatic backups.
The first enabled check creates a backup if none has succeeded before.
The task runs hidden as SYSTEM, even when no user or browser is logged in.
It starts after reboot and resumes overdue backups when the computer/MySQL
is available. It cannot back up while the computer is switched off.
There is no visible repeating batch window and no database password stored
in the Windows task or PowerShell script. Credentials come from the POS.
Do not install separate hourly tasks or the old daily_backup.bat as well.
If an old backup task is already installed, disable that old task manually.
Each POS project path gets a distinct Windows task; reinstalling the same
project updates its existing task. After moving/renaming the project, remove
the old task in Task Scheduler and install again using the new path.

Logs: POS-folder\storage\logs\backup-scheduler.log (rotated at 2 MB).
The backup page shows the last successful automatic backup and latest error.
No-prune or failed backups do not trigger automatic old-file deletion.
Only matching backup filenames for the current database are pruned. The
newest matching backup is retained. Check the folder has adequate disk space.
Use Create Backup Now once to confirm the folder and mysqldump configuration.
An SQL file appears only after mysqldump finishes successfully; a .partial
file while a job is running is not a completed backup.

LINUX / CPANEL HOSTING
Use the hosting Cron Jobs page to run Laravel's scheduler once every minute:
  * * * * * /usr/local/bin/php /home/ACCOUNT/POS-FOLDER/artisan schedule:run >> /home/ACCOUNT/jevapos-scheduler.log 2>&1
Replace ACCOUNT, POS-FOLDER and the PHP binary with the real hosting values.
The same POS interval/retention settings apply. Existing Laravel scheduler
cron entries already run this job; do not create duplicate cron entries.
Use a private writable backup directory outside public_html. Configure the
host's actual mysqldump path and verify the first backup completes.

SCOPE AND RECOVERY
This backs up the configured POS MySQL/MariaDB database only, including its
licence/configuration records. It does not change licensing or expose a
licence issuer. Keep SQL backups private. Files, .env, images, WordPress and
separate legacy SMS Enabler databases need separate backup copies.
Copy backups off the computer regularly. Test restoration into a separate
database periodically; successful dump creation is not proof of recovery.
