POSMaster Help v1.2.0
Installation

Update, backup and restore

Back up first, then update. This page shows how to do both, how to restore if something goes wrong, and how the demo reset command works.

Tip: The easiest way is built in: Settings → System & demo → Backups makes one ZIP with the database and pictures, makes one every night, and restores it in a few clicks. See Backup and restore. The manual methods below (phpMyAdmin, mysqldump) still work and are useful for the hosting company.

What to back up

A POSMaster shop has two things that matter:

What Where it lives
Your data (products, sales, customers, settings) The database
Your pictures (logo, product photos) The folder storage/app/public
Your settings file The file .env (it holds your database password and APP_KEY)

The rest of the app (the code) can always be downloaded again.

Warning: A backup that is stored only on the same server is not a real backup. Keep a copy on your own computer or in cloud storage.

Back up the database

With phpMyAdmin (no terminal)

  1. Open phpMyAdmin and select your POSMaster database.
  2. Click the Export tab.
  3. Choose Quick and the format SQL.
  4. Click Export. Your browser saves a .sql file.
  5. Rename the file with today's date, for example posmaster-2026-10-19.sql, and keep it safe.

Tip: If you choose Custom instead of Quick, keep Add DROP TABLE ticked. It makes restoring into a used database easier.

With mysqldump (terminal)

mysqldump -u DB_USER -p DB_NAME > posmaster-backup.sql

Type the database password when it asks. For MariaDB you can also use mariadb-dump. For Docker, see Install with Docker.

To compress the file on Linux:

mysqldump -u DB_USER -p DB_NAME | gzip > posmaster-$(date +%F).sql.gz

Back up the pictures and settings

Copy these two items to a safe place:

  • the folder storage/app/public
  • the file .env

On cPanel, use File Manager: select the folder, click Compress, and download the ZIP. Or use FTP. On a VPS:

cd /var/www/posmaster
tar -czf posmaster-files-$(date +%F).tar.gz storage/app/public .env

A simple backup plan

  • Back up the database every day if you sell every day.
  • Back up the pictures every week, or whenever you add many products.
  • Keep at least the last 7 daily copies.
  • Test a restore once, on a spare database, so you know it works.

Many hosts have automatic backups. cPanel has Backup and JetBackup. Use them too, but still take your own copy before every update.

Update to a new version

Follow these steps for every new release. Read CHANGELOG.md in the package first. It lists what changed.

  1. Back up the database, storage/app/public and .env.
  2. Put the shop in maintenance mode (terminal only):
php artisan down
  1. Replace the files. Upload the new laravel-project contents over the old app folder. Replace everything except:

    • .env (your settings)
    • storage/app/public (your pictures)
    • storage/logs (optional, your old logs)

    Include the new vendor folder, public/build and bootstrap.

  2. Install dependencies (only if your new package has no vendor folder):

composer install --no-dev -o
  1. Update the database:
php artisan migrate --force
  1. Clear and rebuild the cache:
php artisan optimize:clear
php artisan optimize
  1. Bring the shop back:
php artisan up
  1. Sign in, open the POS and make a test sale to check that everything works.

Warning: Never run php artisan pos:install --demo, migrate:fresh or pos:demo-reset to update a live shop. They erase the database.

Note: Do not delete the public/storage link or the storage folder when you replace files. Without them your pictures disappear. If the link is missing afterwards, run php artisan storage:link.

Updating without a terminal

Some releases change the database, and the change is applied by php artisan migrate --force. If you have no terminal:

  1. Ask your host's support to run php artisan migrate --force in your app folder, or
  2. Ask them to give you SSH access for a few minutes.

If you cannot run any command, upload the files and then delete the cached files inside bootstrap/cache (for example config.php and routes-v7.php; keep the folder and the .gitignore file) so the app does not keep using the old cache. Check CHANGELOG.md to see whether the release changes the database.

Updating Docker installs

Docker updates use a different procedure: rebuild the image and run the migrations inside the container. See Install with Docker.

Restore a backup

Use this if an update goes wrong, or you moved to a new server.

Restore the database

With phpMyAdmin:

  1. Select the database. If you want to start from scratch, tick Check all under the table list and choose Drop to remove all tables.
  2. Click Import.
  3. Choose your .sql file and click Import.

With the terminal:

mysql -u DB_USER -p DB_NAME < posmaster-backup.sql

Tip: If the file is too big for phpMyAdmin, use the terminal command, or ask your host to import it.

Restore the pictures and settings

  1. Copy the backed-up storage/app/public folder back into the app's storage/app/public.
  2. Put your .env file back into the app folder.
  3. Make sure public/storage exists. If not, run php artisan storage:link.
  4. Clear the cache:
php artisan optimize:clear

Restore the app to an older version

If a new version has a problem, put the old files back, restore the database backup you took before the update, and clear the cache. Do not put old files over a database that has already been migrated by a newer version without restoring the database too.

Reset the demo data

The command pos:demo-reset wipes the database and loads the demo shop again. It is made for public demo servers.

php artisan pos:demo-reset

What it does:

  1. Deletes the pictures that visitors uploaded (products, categories and settings folders).
  2. Rebuilds every table and loads the demo shop with 90 days of sales.

It refuses to run while demo mode is off, so you cannot erase a live shop by mistake:

Demo mode is OFF — refusing to wipe a live database. Use --force if you really mean it.

Warning: Adding --force makes it wipe the database even when demo mode is off. Never use --force on a shop with real data.

To reset the demo every night at midnight, set POS_DEMO_RESET_NIGHTLY=true in .env and add the cron job described in Install on web hosting. For a locked public demo, also set POS_DEMO_LOCK=true.

POSMaster 1.2.0 · Help for shop owners, managers and cashiers