we need to design web and mobile app solution for a client. the requirements are following Application with offline capabilities, that will sync with cloud when you reconnect to the internet, but the database should be accessible while offline. Sync button is a must, client will be visiting some locations that don’t have internet access, and will require most recent data
Try Akeeba Backup.
From their site (Akeeba Solo):
One click backup That's all it takes to create a full site backup. The archive includes your database, files and the restoration script.
You can choose whether to backup only database or only files using pro version.
I believe you won't come across critical problems if you set permissions of all "cache" and "tmp" folders to 777.
The backup files can be automatically downloaded easily I guess. Hope this helps.
The standard databases like mysql and mariadb also offer sockets connections.
Some distros its located here: /var/run/mysqld/mysqld.sock
$link = mysql_connect('localhost:/var/run/mysqld/mysqld.sock', 'mysql_user', 'mysql_password');
Also 127.0.0.1 or its alias localhost is also present whether or not your actually online, and you can use that to connect to the database.
You might have to change the my.cnf to allow connection on 127.0.0.1 on some distros.
When they are online you write code to sync the database.
While I generally use MySQl (or MariaDB), as suggested by @cybernard on the server, you are talking client side here.
Sqlite is … well, errm, … lite.
- It uses fewer resources
- It is a single executable, almost certainly already present on any smartphone, as browsers use it for local storage
- It is also a library, which can be linked with an executable, to allow you to distribute a single file
- The database itself is a single file, so backups can be easily made by just copying that file.
So, I assay definitely Sqlite for the client side. You can sue it server side too, although you could go with MyDSql/MariaDB there, if you prefer.