having trouble locating the backup files

coryjsanders

Joined
Mar 25, 2010
Messages
181
Likes
0
Points
0
#1
dicko, can you help me out? I fixed my voicmail problem and just gave another junior border everything I found out, so I think I deserve at least a half a Karma point. Hoping to cash it in with you. I run a backup from the GUI and it saves. EWT says they are in /var/www/html/backup. the FreePBX says you may have to create a backups folder. There was not one in /var/www/html so I did mkdir backup and I now have 0 files in /var/www/html/backup. I've tried running the backup again, but they do not deposit there. Is there a .conf file that I can edit that tells the backup where to go? They appear in the GUI, and I've saved one to my PC's HD (about a 35MB file), but I can not find them. from the root I've done find / "elastixbackup" and find /"backup*" , and a few other iteratiouns. I get no such file or directory. I've also done this from /var/www/html ??? They are in the GUI but seem to be in teh bit bucket on the dark side.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
It depends on the Elastix version you use, until 1.6 it was indeed in /var/www/html/backup, but someone realized how dumb that location is (think about it) you might look in /var/www/backup which is a far more secure location, especially if you still have the default webmail installed. The FreePBX backups are in /var/lib/asterisk/backups/ (by default) it should make folders appropriately named as you generate backup strategies.

locate is quicker than find but you need to run updatedb (make a cron job) before it works, find / -name "*backup*" should also work.

regards

dicko

p.s. and yes, I read your post, karma++ to you you've come a long way dude!
 

coryjsanders

Joined
Mar 25, 2010
Messages
181
Likes
0
Points
0
#3
Okay. At the risk of ruining my good karma with you, tell me how I restart amportal, or to apply the changes. The file says Run /usr/src/AMP/apply_conf.sh after making changes, but I get No such file or directory when I do this. Just won't do anything for me. Tried the Linux forum and google. Cant' figure it out. Thanks.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
AMP in that particular location is a place holder that will refer to the version of FreePBX that one installs from source, you didn't do that, you did it with an RPM. Be careful that your sources of information pertain specifically to your deployment or you might get youir fingers burned.

the conventional way is to:

amportal restart

just

amportal

for other options


which will read /etc/amportal.conf and processes those directives. (you should peruse that file, it contains lots of very interesting information, if you learn something in there you can keep that karma :) ) amportal is itself a "wrapper" script /usr/sbin/amportal , if you read that also and understand it, then feel free to increase your own karma.

A few hours spent at freepbx.org will I'm sure be beneficial to you also.


dicko
 

coryjsanders

Joined
Mar 25, 2010
Messages
181
Likes
0
Points
0
#5
amportal restart. Who would have thought? I tried service amportal restart after I learned service postfix restart. Unrecognized service. I am setting out to learn about scheduling daily/weekly/monthly backups as suggested in one of your posts. I searched backup here and read some of what you have suggested. I forgot to tell you, my backup files were where you said. So I'm off to explore backing up automatically and them perhaps even dumping to a usb drive plugged into my box. If I just plugged a 2Gig usb stick into the back of my box, and wrote a script that output the contents of the file to the drive, and created lifo type of erase schedule, I could always be sure to have the last 20 or so days of backup, if the elastixbackup file was 100MB. Mine is curently 32, and I have only 9 extensions with no voicemail stored or much of a cdr. I'm really only concerned with the last day or so, in case the box takes a dump. Then I could put in a new HD and restore a system to it's last good config. Yes, or no? what did you mean by monthly imaging of the system?
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
Check my posts about installing mondoarchive , invest in a 8g (or bigger) USB, run mondoarchive and choose the usb device you just plugged in (/dev/sdx or something, cat /proc/partitions should reveal it) , follow the screens, reboot your machine from the usb stick, verify it works (that just for giggles and the paranoid, it almost always does) , change the hard-drive, reboot from the stick and "nuke" the fucker, end of story you are cloned (well after 30 minutes or so) and yes you can script/cron job the whole process.

On the other hand for the last 20 days backup (no cloneing)

make sure your usb is /dev/sdx

fdisk /dev/sdx and delete everything, create a linux partition, write the config, mkfs.ext3 /dev/sdx1; mkdir /backups; (just do this once, you want to get rid of all that windoze crap and set your machine up)

The script/ cron job is something like:

( find /<yourbackup.directory/ -name "*.<whatsappropriate>" -mtime -21 -delete && mount /dev/sdx1 /backups && rsync -av --progress --delete <your backupdirectory> /backups && umount /backups && echo "Finished all that backup shit at `date`" ) |mail me@home.com

stick it in your pocket until the next time or leave it there the cron job will abort if the stick is not there (or write it to the root of the other usb drive you plugged in by accident)

p.s.
a quick way to check and set available "services" is

ntsysv
 

coryjsanders

Joined
Mar 25, 2010
Messages
181
Likes
0
Points
0
#7
okay. That's a lot for someone still on the Newbie Page. I just read ampbackup.pl (went to it from reading amportal, trying to maintain my karma) and I see where I can set what I want to be auto backed up. Setting the yes ... no creates the BackupTable, I think. I don't see where you can set up a schedule to > those backups to a folder you create. I think that's what your cron job is doing? I see you edited it and put in more details about time stamping and such. I need to study that masterpiece. More shall be revealed. I'm going to read on and check your modoarchive posts and spend some time at freepbx.org. Thanks. Like my Windoze CPU, I am going to sleep. Best.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
Backup and restore in FreePBX tools page for the scheduling , for a more complete way of doing the Elastix backup, mkoreen did a very nice job on the forums of deconstructing that process and adding other crap you might need backed up and running that as a cron job also, goodnight.

dicko
 

Kalama Sutra

Joined
Apr 15, 2009
Messages
95
Likes
0
Points
0
#9
Corry,

Yep, I agree, stay on the good side of dicko :whistle: cause he knows his poo around here; and, if you're doing the diggin' he'll point to where to put the shovel.

If you happen to be fat fingered such as myself, read the manual and load webmin ... some dicko advice to me a while back < good credit goes to source, bad credit to Washington DC :woohoo: >

What I have used webmin for is the cruising around to make certain where certain files reside, and also for reading them. Also, using it's upload / download features to work on my file changes from where else, but my Mac-mini with TextWrangler :pinch:

Luck & Regards,

Jim

ps. dicko - karmalized point for that post over in "Security" I did not want to screw up your post with new-guy gushing... waiting for the old hands to carry that discussion. Thanks Bud ! B)
 

coryjsanders

Joined
Mar 25, 2010
Messages
181
Likes
0
Points
0
#10
kalama, thanks. I use WinSCP. I think it is the same/similar to webmin, because I can use it to drill down for files and read and edit and import/export. Used it to import config files and a sip file into my tftp. The Endpoint Manager only will configure one extension per phone (is supposed to do more in 2.0, according to the nice folks at Palo Santo), and I wanted to put multiple lines per phone. Tried to edit the config file generated by EM, but did not work. So imported my Polycom factory files and the factory SIP and it worked great. Just had to change the permissions and delete the old files. Also used it to export my elastixbackup file to my desktop, which was a lot easier that the recipe dicko prescribes above. It will take me awhile to get there. I'll wait a while before I "go to the well." Thanks for the pointers.
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,901
Messages
130,885
Members
17,561
Latest member
marouen
Top