How to Install Elkarbackup on Debian Latest
Elkarbackup is an open-source backup solution that is designed to backup files, databases, and system configuration in a simple and easy way. In this tutorial, we will be explaining the steps to install Elkarbackup on Debian latest.
Prerequisites
Before proceeding with the installation, make sure you have the following requirements:
- A system running Debian latest.
- A sudo user.
- An internet connection.
Step 1: Update and Upgrade System Packages
The first step is to update and upgrade the system packages to their latest versions using the following command:
sudo apt update && sudo apt upgrade -y
Step 2: Install Required Packages
Next, we need to install some required packages for Elkarbackup to work correctly. These packages include Apache2, PHP, MariaDB, and other necessary packages. Use the following command to install these packages:
sudo apt install -y apache2 php mariadb-server php-xml php-mysql php-pdo php-zip php-intl php-bz2 php-bcmath php-mbstring php-gd rsync curl zip unzip
Once installation completes, you need to restart the Apache2 service:
sudo systemctl restart apache2
Step 3: Download and Install Elkarbackup
Next, we need to download and install Elkarbackup from Github. To do this, follow the steps below:
- Go to the Elkarbackup Github page and download the latest release.
- Extract the downloaded file and place it in the
/var/www/html/folder.
cd /var/www/html/
sudo mv /path/to/elkarbackup-filename.tar.gz .
sudo tar -xzf elkarbackup-filename.tar.gz
- Change permissions of Elkarbackup folder
cd /var/www/html/elkarbackup/
sudo chown www-data:www-data . -R
sudo chmod 0775 . -R
Step 4: Create Elkarbackup Database & User
Next, we need to create a database and user for Elkarbackup. To do this, run the following commands:
First, log in to the MariaDB server:
sudo mariadb -u root -p
Create a new database called elkarbackupdb using the following command:
CREATE DATABASE elkarbackupdb;
Now, we will create a new user called elkaruser with a secure password. Replace the password placeholder with your preferred password:
CREATE USER 'elkaruser'@'localhost' IDENTIFIED BY 'password';
Next, grant all permissions to the elkaruser on the elkarbackupdb database:
GRANT ALL PRIVILEGES ON `elkarbackupdb`.* TO 'elkaruser'@'localhost';
Finally, exit the MariaDB server:
exit
Step 5: Configure Elkarbackup
Next, we need to configure Elkarbackup by editing the config.php file located in the Elkarbackup directory:
sudo nano /var/www/html/elkarbackup/application/config/config.php
Find the following lines in the file and update them as shown below:
$config['elkarbackup_version'] = '1.3.10';
$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'elkaruser';
$config['database']['password'] = 'password';
$config['database']['database'] = 'elkarbackupdb';
Save the file and exit the editor.
Step 6: Setup Cron Job for Elkarbackup
Now, we need to set up a cron job to run Elkarbackup every day. Run the following command:
sudo crontab -e
Add the following line at the end of the opened file:
0 0 * * * /usr/bin/php /var/www/html/elkarbackup/cron/cron_daily.php >/dev/null 2>&1
This will run Elkarbackup every day at midnight. Save the file and exit the editor.
Step 7: Access Elkarbackup Web Interface
We are now ready to access the Elkarbackup web interface. Open your web browser and navigate to:
http://your_server_ip/elkarbackup
You should now see the Elkarbackup web interface. Login using your MariaDB user credentials.
That's it! You have successfully installed Elkarbackup on Debian latest. You can now start using Elkarbackup to backup your files, databases, and system configurations.