Auto backup from time to time

Hi,

I setup my backup for a month now and SambaPOS backups only from time to time.

My last auto backup is from the 12th of July.
No problem with manual backup.

Backup

Settings are setup for a month now:

Working Period:

Any idea?
Any log?

Note:
I just notice that the last auto bakup was done on july the 12th at 1:37 am - which correspond with the end of the working period. OK.
On the 12th -13th, the next backup should occur, but:
The night team forgot to close the working period.
So the morning team closed the previous working period at 6:45 am and started a new working period immediately which apparently broke the backup. Ok, why not.
However since then no more backup, that’s weird.

Marc

Check the log for errors …

[Documents]\SambaPOS5\log.txt

On the server the last log is from 7th of june.
On my terminal from9th of june.

looking on waitresses terminal (however the “server” does the autobackup)
same log,txt’s date is in june.

(I restarted the server yesterday expecting a backup today, but no)
I did a manual backup today … it might “unlock” the autobackup.

This morning no auto backup …

As you will be using SQL Server Express, the database backups will only automatically run if you end the work period on the Server machine. If you end work period from another terminal (i.e. not the system where SQL Server is installed) it will not run, this is because of a permissions issue that the backup process within SQL Server can only run on the local machine. I wish this was more straightforward but I believe it’s a limitation to the way backups are handled by SQL server and not SambaPOS related.

This has caused me issues for a long time and eventually the only way you can resolve is either:

  1. End work period on the server machine (the machine where SQL server is installed)
  2. If you have SambaPOS open on the server machine, instead of using the auto backup on end work period, setup a trigger and set a rule on the trigger to run the Backup Database action. So, if you know the server will have SambaPOS running from 9am to 10pm, just make sure your trigger is set to run sometime between those times. Note that I was with the belief that triggers missed will run on next open of the application, however I haven’t seen that work for the backup triggers I have set.
  3. Don’t backup in SambaPOS - use a SQL backup script that is triggered by Windows Task Scheduler, or use a free tool like https://sqlbackupandftp.com/
1 Like

Hmm, think this can soon be worked arround though, mine backup everyday for terminals other than server.
My backup location is a shared folder on the server accessible to all terminals with permissions for MSSQL service/task

Thx!

I went for the trigger solution …
My first trigger :slight_smile: so easy … SambaPOS rocks.

Marc

1 Like

I think I have my SQL server set with the default permissions for the service, which is local machine I believe. It’s probably the reason I can’t backup from other terminals. Probably one day I will investigate it further, thanks for the advice!

I have added the NT_Service\MSSQL$InstanceName to the permissions for my epos shared folder on server which lets me run and restor backup from any machine.
And obviously map the shared folder to each till with the same drive letter so the global backup directory works for all.

Rule’s Backup works.

For information : Autobackup gives me the following error on the server:

Marc

That file SambaPOS_full.bak will only exist during creation of the backup. The process will backup to the .bak file, then it will zip it and finally delete the .bak file. I am guessing that possibly the file got deleted before a process has finished. Are you getting this error every time? Is it stopping backups happening?