#!/bin/bash## elxisrestore.sh v1.0 by Ioannis Sannos (Elxis Team)## Parameterselxisrootdir="/home/user/public_html"tarfile="sitebackup.tar"sqlfile="sqlbackup.sql"startdir="/home/user"# Database connection informationdbname="my_database_name"dbhost="localhost"dbuser="database_user"dbpw="database_password"# Remove old website filesrm -rf $elxisrootdir/*# UnTAR Elxis filescd $elxisrootdirtar xf $startdir/$tarfilecd $startdirecho "use $dbname; set names utf8; source $sqlfile;" | mysql --password=$dbpw --user=$dbuser --host=$dbhost
NoteThe upcoming Elxis new generation (4.x Nautilus) has an integrated system to backup both database and files!
when i do it from cpanel , is there anything that i have to be carefull?