Cacti Backups

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

villieb
Cacti User
Posts: 75
Joined: Fri Nov 09, 2012 5:14 am

Re: Cacti Backups

Post by villieb »

Code: Select all

-rwxr-xr-x 1 root root 4.5M Apr 5 11:59 Cacti-Database-2013-04-05.sql
-rwxr-xr-x 1 root root 4.5M Apr 5 11:59 CactiFolder-2013-04-05.tar.gz
-rwxr-xr-x 1 root root 25K Apr 5 12:01 CLI_files-2013-04-05.tar.gz
-rwxr-xr-x 1 root root 34K Apr 5 12:01 LOG_files-2013-04-05.tar.gz
-rwxr-xr-x 1 root root 122M Apr 5 12:01 RRAXML_files-2013-04-05.tar.gz
-rwxr-xr-x 1 root root 6.2K Apr 5 12:01 SCRIPT_files-2013-04-05.tar.gz
mouthpiec
Posts: 15
Joined: Sat Mar 30, 2013 9:24 am

Re: Cacti Backups

Post by mouthpiec »

the main difference in size is the RRAXML_files-2013-04-05.tar.gz

Do you know what this file contain?
villieb
Cacti User
Posts: 75
Joined: Fri Nov 09, 2012 5:14 am

Re: Cacti Backups

Post by villieb »

These are the RRD files that have been rrddumped to XML files. I think yours are empty.

I run the script without "–-range-check" as I think this causes problems.

Looking on http://oss.oetiker.ch/rrdtool/index.en.html it doesn't mention using the range-check variable when using rrdtool dump.

I would suggest to run the script without the range check because I know it works that way.
mouthpiec
Posts: 15
Joined: Sat Mar 30, 2013 9:24 am

Re: Cacti Backups

Post by mouthpiec »

i think it is better as suggested:

Code: Select all

[root@localhost cacti-backup]# ls -lh
total 71M
-rw-r--r-- 1 root root 3.6M Apr  5 14:20 Cacti-Database-2013-04-05.sql
-rw-r--r-- 1 root root 8.1M Apr  5 14:20 CactiFolder-2013-04-05.tar.gz
-rw-r--r-- 1 root root  26K Apr  5 14:22 CLI_files-2013-04-05.tar.gz
-rw-r--r-- 1 root root 505K Apr  5 14:22 LOG_files-2013-04-05.tar.gz
-rw-r--r-- 1 root root  59M Apr  5 14:22 RRAXML_files-2013-04-05.tar.gz
-rw-r--r-- 1 root root 5.7K Apr  5 14:22 SCRIPT_files-2013-04-05.tar.gz
raminmalek
Posts: 20
Joined: Fri Jul 10, 2015 4:12 pm

Re: Cacti Backups

Post by raminmalek »

How run this scripts ???


How apply this to my cacti server
villieb
Cacti User
Posts: 75
Joined: Fri Nov 09, 2012 5:14 am

Re: Cacti Backups

Post by villieb »

Copy either the backup/restore script and save as "backupscript.sh"

run script using "bash /<location of script/backupscript.sh"

Remember to edit the file and change the mysql password to the one you set when setting up.
Cornel
Posts: 49
Joined: Fri Jun 27, 2014 7:19 am

Re: Cacti Backups

Post by Cornel »

I have a question on these scripts. I use these scripts and run great. I backup my Cacti weekly.
I finally need to do a restore after 2 years of using it, and I have an issue.
Im doing a backup of all data. No errors.
Im doing a restore of all data (new server, new IP). No errors.
I try to go https://server-name/cacti
I get nothing. No website, no nothing. Am I missing something, or does this backup only works if you use the same server IP?
Thanks...
villieb
Cacti User
Posts: 75
Joined: Fri Nov 09, 2012 5:14 am

Re: Cacti Backups

Post by villieb »

Are you reinstalling cacti before you restore the data?
Cornel
Posts: 49
Joined: Fri Jun 27, 2014 7:19 am

Re: Cacti Backups

Post by Cornel »

villieb wrote:Are you reinstalling cacti before you restore the data?
yes. This is what I do.
I backup my current Cacti Data with the script in this thread.
I create a new server (VM).
I install cacti, and cacti necessary packages, Apache2, etc etc.
I then reboot.
Cacti works great.
I copy the backup files to the new server (VM).
I use the restore script.
I can still see the Cacti Site while the script is running up until about almost at the end. When it gets to that point, Cacti website says "The Webpage cannot be found" and I cannot do anything after that, but I know Cacti is running in the back as I see my devices being pulled data from the server.
Where did I go wrong or am I missing a step?
Thanks...
villieb
Cacti User
Posts: 75
Joined: Fri Nov 09, 2012 5:14 am

Re: Cacti Backups

Post by villieb »

Maybe there's something in the cacti folder where you allow http from anywhere needs changing. I can't remember of the top of my head. I don't have a test environment to check (or a production one either) since I changed jobs
Cornel
Posts: 49
Joined: Fri Jun 27, 2014 7:19 am

Re: Cacti Backups

Post by Cornel »

villieb wrote:Maybe there's something in the cacti folder where you allow http from anywhere needs changing. I can't remember of the top of my head. I don't have a test environment to check (or a production one either) since I changed jobs
OK I found the issue finally. Holy crap, 4 days of playing with this, finally got the darn thing to work. The issue is plugins directory. It seems it did not like some of the plugins, among one of them that gave me trouble is the SSL Plugin. The others, I was able to work around them, but SSL Plugin was the major culprit. Once I removed that from the Plugins folder, BAM, everything came up.
Phew, man it was a long troubleshooting, but it was worth it.
Thanks...
Cornel
Posts: 49
Joined: Fri Jun 27, 2014 7:19 am

Re: Cacti Backups

Post by Cornel »

villieb wrote:Maybe there's something in the cacti folder where you allow http from anywhere needs changing. I can't remember of the top of my head. I don't have a test environment to check (or a production one either) since I changed jobs

One small problem, probably you guys found a solution to this before. All my data is available from the backup, but no new data is being graphed. Am I supposed to do something after I restore my data? I did the php poller.php and still I do not get any new data.
Thanks...
User avatar
micke2k
Cacti User
Posts: 261
Joined: Wed Feb 03, 2016 3:38 pm

Re: Cacti Backups

Post by micke2k »

Cornel wrote:
villieb wrote:Maybe there's something in the cacti folder where you allow http from anywhere needs changing. I can't remember of the top of my head. I don't have a test environment to check (or a production one either) since I changed jobs

One small problem, probably you guys found a solution to this before. All my data is available from the backup, but no new data is being graphed. Am I supposed to do something after I restore my data? I did the php poller.php and still I do not get any new data.
Thanks...
Rebuilt the poller cache?
Cornel
Posts: 49
Joined: Fri Jun 27, 2014 7:19 am

Re: Cacti Backups

Post by Cornel »

micke2k wrote:
Cornel wrote:
villieb wrote:Maybe there's something in the cacti folder where you allow http from anywhere needs changing. I can't remember of the top of my head. I don't have a test environment to check (or a production one either) since I changed jobs

One small problem, probably you guys found a solution to this before. All my data is available from the backup, but no new data is being graphed. Am I supposed to do something after I restore my data? I did the php poller.php and still I do not get any new data.
Thanks...
Rebuilt the poller cache?
Thank you. What I actually had to do is to change the Poller Type from cmd.php to spine. Then it worked like a charm. Thank you...
hardwar315
Posts: 17
Joined: Sun Sep 24, 2017 1:44 am

Re: Cacti Backups

Post by hardwar315 »

Hi,

When I've run file backup-cacti.sh. But I has error:

'var/lib/cacti/scripts/backup-cacti.sh: line 7: syntax error near unexpected token `
'var/lib/cacti/scripts/backup-cacti.sh: line 7: `rrdump ()

What happen for my scripts?


I've newbie cacti. :)
cacti 1.1.16
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests