The SqlBak application connects your Linux servers to sqlbak.com, allowing you to manage MySQL, PostgreSQL and MS SQL Server database backups from the web. It should successfully work on different Linux distributions such as Ubuntu, Debian, Fedora, CentOS and RHEL, but if you face any difficulty in using the app on your GNU/Linux distribution let us know.
Installation through the package manager
To install SqlBak you need to do several common steps. You need to execute a few commands according to your Linux distribution. First, you need to add a link to the app’s package to a repository list. Then, update the package manager and install the app.
Debian/Ubuntu
- Download package
curl -o sqlbak.deb https://sqlbak.com/download/linux/latest/sqlbak.deb
- Install the app
sudo apt-get install ./sqlbak.deb
RHEL/CentOS/OpenSUSE/Fedora/Oracle
- Install the app
sudo rpm -Uvh https://sqlbak.com/download/linux/latest/sqlbak.rpm
Linux Mint
- Download package
curl -o sqlbak.deb https://sqlbak.com/download/linux/latest/sqlbak.deb
- Install the app
sudo apt-get install ./sqlbak.deb
Amazon Linux AMI
- Install the app
sudo rpm -Uvh https://sqlbak.com/download/linux/latest/sqlbak.rpm
Kali Linux
- Download package
curl -o sqlbak.deb https://sqlbak.com/download/linux/latest/sqlbak.deb
- Install the app
sudo apt-get install ./sqlbak.deb
Photon OS
- Install the app
sudo rpm -Uvh https://sqlbak.com/download/linux/latest/sqlbak.rpm
Testing
After the installation, it is good to check if the SqlBak service is successfully running:
sudo service sqlbak status
If everything is fine you should see something like this (pay attention to the green “active (running) text”):
Server Registration
In order to see your computer on sqlbak.com’s dashboard, you need to register it as a server there. This is done with the following command:
sudo sqlbak -r -k <your_secret_key> [-n <desired_server_name>]
Where:
- <your_secret_key> is a 36-character key you see on the download page when you are logged in
- <desired_server_name> is a name you would like this computer to be named on sqlbak.com, if you omit this parameter the current hostname will be used
Adding a DBMS connection
Now it’s time to connect SqlBak to your DBMS:
sqlbak -ac -dt <database_type> -u <user_name> [-p <password>]
Where:
- <database_type> can be MySQL, PostgreSQL or MS SQL
- <user_name> is a DBMS user name
- <password> is a password for the DBMS user
This command supports some additional optional parameters:
- -ct specifies a connection type (default is TCP/IP)
- -h specifies the host of the DBMS (default is localhost)
- -P specifies a port to connect to the DBMS
- -ssh allows connecting the DBMS through an ssh tunnel
To get more details about using these parameters and other useful commands read the command reference.
After the connection is added you should see something like:
The connection has been successfully added. Connection-Id: 1, DBMS-Type: mysql, Connection-Name: localhost:3306
Adding a backup job
When you establish all necessary DBMS connections, you can go to the dashboard and add backup jobs for regular database backup.
Why do we need to register our SQL Server? Does it compromise with security?
Hello,
All you need to do is to set a connection to your DBMS. Please find more details on what information we collect at https://sqlbak.com/privacy
Hello
Please confirm if this lines are updated (see baseurl)
sudo sh -c ‘echo ” \
[sqlbakrepo] \
name=Sqlbak Repository \
baseurl=https://sqlbak.com/rpm/ \
enabled=1 \
gpgcheck=0″ >> /etc/yum.repos.d/sqlbak.repo’
we have problems installing on CentOS
Hello Enrique,
Thank you, we have fixed it.
Sorry for the inconvenience.
Hi, trying to add a database can I get:
Handling a console command has failed. Failed to add DBMS connection. “/usr/bin/mysql: /etc/sqlbak/libtinfo.so.5: no version information available (required by /usr/lib/x86_64-linux-gnu/libedit.so.2)
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
Can you advise please?
Hi Ashley Aitken,
It seems you have to change the root password. Could you please try to do it and check if it works for you?
this sounds like a big security risk 🙂
do i understand it right you get the username and password from the mysql server?
i skip this one :-))
Hi John,
Yes, you specify your User Name and password to connect your DBMS in the SqlBak app to establish the connection to your databases. However, all your credentials are stored only on your server, in the /opt/sqlbak/local.db directory, and are not stored on sqlbak.com servers. Please find more details at https://sqlbak.com/privacy
Thanks for your smart backup tool! I´m using docker for my postgresql database. But the docker image uses Alpine Linux. How would to install inside Alpine linux version?
Kind regards
Hi Hermes Alves,
To work with a database installed in docker, we recommend installing SqlBak in a separate docker container https://hub.docker.com/r/pranasnet/sqlbak
Deb repository not available.
https://sqlbak.com/deb stable Release
404 Not Found [IP: 209.133.198.58 443]
Reading package lists… Done
E: The repository ‘https://sqlbak.com/deb stable Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Hi Sergey,
We made a decision to abandon the repository, the current installation instructions can be found on the “Download” https://sqlbak.com/download page at the “Linux” tab.
To prevent apt-get from throwing errors, please delete the file /etc/apt/sources.list.d/sqlbak.list
Thank you!
Is there any price for using sqlbank if so whats is the price plan
Hi mukhusin siraji,
SqlBak has both free and paid plans, please find more details at https://sqlbak.com/price
My Pi4 is running mariaDB, which I thought was a MySQL clone. PHPMyAdmin works on it without issue.
When I put MySQL in as database type I get “MySQL no such file or directory” Does this stop me from using SqlBak?
Hello Gordon Finlay,
In order to resolve the issue, we require more details. Could you please contact our support directly at https://sqlbak.com/support?
Thank you!
Hello! I’m currently facing an error with the backup compressed file, which is throwing an error whenever I try to run the backup job more than once.
I set the SFTP destination path, but it can only run one time (when the file does not exist).
Am I doing something wrong?
192.168.0.10
D:\sqlbak
Those are the host and the SFTP destination.
Hello Emanuel,
To resolve the issue, we require more details. Could you please contact our support team via https://sqlbak.com/support?
could You help me please
i’m facing an error after installing sqlbak ver 1.9.79
couldn’t start the sqlbak service and here is the log
May 16 18:10:43 MYM systemd[1]: Starting SqlBak…
May 16 18:10:44 MYM sqlbak[36818]: Traceback (most recent call last):
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak/local_db.py”, line 94, in _executescript
May 16 18:10:44 MYM sqlbak[36818]: sqlite3.OperationalError: attempt to write a readonly database
May 16 18:10:44 MYM sqlbak[36818]: During handling of the above exception, another exception occurred:
May 16 18:10:44 MYM sqlbak[36818]: Traceback (most recent call last):
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak_build.py”, line 5, in
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak/run.py”, line 40, in main
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak/app.py”, line 45, in start_app
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak/app.py”, line 40, in start_app
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak/local_db.py”, line 581, in create_db_tables_and_update_db_version
May 16 18:10:44 MYM sqlbak[36818]: File “sqlbak/local_db.py”, line 100, in _executescript
May 16 18:10:44 MYM sqlbak[36818]: sqlite3.OperationalError: attempt to write a readonly database
May 16 18:10:44 MYM sqlbak[36818]: [36818] Failed to execute script ‘sqlbak_build’ due to unhandled exception!
May 16 18:10:45 MYM systemd[1]: sqlbak.service: Control process exited, code=exited, status=1/FAILURE
May 16 18:10:45 MYM systemd[1]: sqlbak.service: Failed with result ‘exit-code’.
May 16 18:10:45 MYM systemd[1]: Failed to start SqlBak.
May 16 18:10:45 MYM systemd[1]: sqlbak.service: Consumed 2.000s CPU time.
Hello Muhammed,
The key aspect is that the application must have read and write access to the following directories:
/etc/sqlbak/
/opt/sqlbak/
/tmp/sqlbak/
We will further investigate your case and release an article with setup instructions later.
If you have any other questions, please let us know.
Thank you, and sorry for the inconvenience.