This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Full panel backup - in case if there is a server crash
#1
Full panel backup - in case if there is a server crash
Hello. My Sontora is running on a CentOS 7 VPS. Currently it's serving some accounts.

But considering the risks of a VPS and stability, I was wondering if there is a way I could run a scheduled backup (just like what you get in WHM backup with root) of the whole panel just in case the server fails. Is there a way I could achieve this perhaps linking it with Hubic or MultCloud system?

Even if it cannot restore the full Sentora panel - it's OK. I am mostly worried about the database and user accounts and files. If it can just backup all the user related files (Database and all files in user accounts in separate folders) that would be just great.

Any help will be greatly appreciated  Smile Thank you!
Reply
Thanks given by:
#2
RE: Full panel backup - in case if there is a server crash
You could use the following commands:

Backup sentora+hosts:

find /var/sentora -path '*.*/.*' -prune -o -type f -print | zip /choosedirectory/`date +%a-%d-%b-%H-%M`-backup.zip -@

Backup all sql:

mysqldump -u root -ps(root password) --events --all-databases| gzip > /choosedirectory/`date +%a-%d-%b-%H-%M`-backup.sql.zip

You can put these commands in a cronjob to run every nicht.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:
#3
RE: Full panel backup - in case if there is a server crash
(09-06-2015, 04:56 PM)bbspike Wrote: You could use the following commands:

Backup sentora+hosts:  

find /var/sentora -path '*.*/.*' -prune -o -type f -print | zip /choosedirectory/`date +%a-%d-%b-%H-%M`-backup.zip -@

Backup all sql:

mysqldump -u root -ps(root password) --events --all-databases| gzip > /choosedirectory/`date +%a-%d-%b-%H-%M`-backup.sql.zip

You can put these commands in a cronjob to run every nicht.

Thank you for the reply. But can we schedule an FTP upload too?
Reply
Thanks given by:
#4
RE: Full panel backup - in case if there is a server crash
http://forums.sentora.org/showthread.php?tid=242

Also

https://github.com/MBlagui/Sentora-tools...erfiles.sh

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:
#5
RE: Full panel backup - in case if there is a server crash
(09-06-2015, 07:41 PM)Me.B Wrote: http://forums.sentora.org/showthread.php?tid=242

Also

https://github.com/MBlagui/Sentora-tools...erfiles.sh

M B

Thank you. But I guess that thread is trying to say there is no stable module to achieve that sort of solution. But is there a guide available that can help me cron the job and put it in a .sh script. 

I am a newbie in cron job territory. Would be grateful if anyone could help me a little Smile
Reply
Thanks given by:
#6
RE: Full panel backup - in case if there is a server crash
I tried to the following but failed... any suggestions?

I've put the script in an .sh file and placed it under directory - /var/sentora/cronbackup/dailybackup.script.sh

Code:
#!/bin/sh
USERNAME="****"
PASSWORD="*****"
SERVER="ftp.****.com"
# local directory to pickup *.tar.gz file
FILE="/var/sentora/hostdata/"
# remote server directory to upload backup
BACKUPDIR="/oxenbackup"
# login to remote server
ftp -n -i $SERVER <<EOF
user $USERNAME $PASSWORD
cd $BACKUPDIR
mput $FILE/*.tar.gz
quit
EOF
#!/bin/sh
USERNAME="****"
PASSWORD="*****"
SERVER="ftp.****.com"
# local directory to pickup *.tar.gz file
FILE="/var/sentora/hostdata/"
# remote server directory to upload backup
BACKUPDIR="/oxenbackup"
# login to remote server
ftp -n -i $SERVER <<EOF
user $USERNAME $PASSWORD
cd $BACKUPDIR
mput $FILE/*.tar.gz
quit
EOF


In crontab -e added the following: 


Code:
* * * * *  /var/sentora/cronbackup/dailybackup.script.sh
But it's not working.... Any suggestions?
Reply
Thanks given by:
#7
RE: Full panel backup - in case if there is a server crash
(09-06-2015, 05:06 PM)mettacell Wrote:
(09-06-2015, 04:56 PM)bbspike Wrote: You could use the following commands:

Backup sentora+hosts:  

find /var/sentora -path '*.*/.*' -prune -o -type f -print | zip /choosedirectory/`date +%a-%d-%b-%H-%M`-backup.zip -@

Backup all sql:

mysqldump -u root -ps(root password) --events --all-databases| gzip > /choosedirectory/`date +%a-%d-%b-%H-%M`-backup.sql.zip

You can put these commands in a cronjob to run every nicht.

Thank you for the reply. But can we schedule an FTP upload too?

You can make te directorys for above commands Mount to a NAS or something.
[Image: logo2.png]

My being on this forum is all personal and all is done here by me has nothing to with the company Web Improved I work for Smile
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Server Crash rsthomas 3 6 ,713 05-18-2022, 09:26 AM
Last Post: Nigel
Server Vs. Workstation zHostingSolutions 4 7 ,873 09-14-2021, 06:30 AM
Last Post: sparkrack
https without certificate redirects to panel iraqiboy90 10 19 ,733 02-28-2021, 11:20 AM
Last Post: iraqiboy90

Forum Jump:


Users browsing this thread: 2 Guest(s)