FOOD FOR THOUGHT Incredible Backup/Restore on 13-13 Broken

Discussion in 'Help' started by kyle95wm, Nov 30, 2018.

  1. kyle95wm

    kyle95wm Phone Genius Owner

    Joined:
    Apr 16, 2016
    Messages:
    444
    Likes Received:
    83
    So I thought I'd try to run the backup/restore scripts and they wound up messng up my system and show errors about how Asterisk was already running. Any plans to fix these scripts? I would very much like to use these scripts to "take an image" of a Hiformance server that I'm helping someone set up.
     
  2. Merlin

    Merlin Member

    Joined:
    Mar 10, 2017
    Messages:
    37
    Likes Received:
    1
    Have you had any luck using the backup-restore option in the admin area?
     
  3. kyle95wm

    kyle95wm Phone Genius Owner

    Joined:
    Apr 16, 2016
    Messages:
    444
    Likes Received:
    83
    How reliable is that?
     
  4. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,351
    Likes Received:
    2,442
    Have you tried this approach: http://nerdvittles.com/?p=24610
     
  5. kyle95wm

    kyle95wm Phone Genius Owner

    Joined:
    Apr 16, 2016
    Messages:
    444
    Likes Received:
    83
    Yeah, in the past, but it takes too long. I liked the older scripts since it only took a few minutes to back everything up. Now I would have to wait anywhere between 15-20 minutes, and in the end, get a gigantic tarball (in comparison to the hundreds of megabytes)

    A fix for these scripts would really benefit those who just want a backup like in the 13-12 days.
     
  6. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,351
    Likes Received:
    2,442
    Lots of reasons that may no longer be possible. One example is the migration from MySQL to MariaDB. InnoDB is no longer an option. It's required. FreePBX now is a mix of database types. And you can't make file copies of InnoDB databases just by shutting down the database server.
     
  7. kyle95wm

    kyle95wm Phone Genius Owner

    Joined:
    Apr 16, 2016
    Messages:
    444
    Likes Received:
    83
    So I re-read the article and found this snippet of code:

    Code:
    tar -cf /tmp/backup.tar /var/www /var/lib/mysql /var/lib/asterisk /root /etc/asterisk /etc/crontab /etc/pbx /var/spool/asterisk /etc/freepbx.conf /etc/amportal.conf
    I replaced the original tar command from the script with that and it behaves just like incredible backup which is what I wanted. I tested it out on a new system and it worked flawlessly.
     
    ostridge likes this.
  8. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,351
    Likes Received:
    2,442
    As long as you don't have InnoDB activated, that will work. If there are InnoDB databases, you'll get a royal mess.
     
  9. kyle95wm

    kyle95wm Phone Genius Owner

    Joined:
    Apr 16, 2016
    Messages:
    444
    Likes Received:
    83
    How do I go about checking for these databases?
     
  10. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,351
    Likes Received:
    2,442
    Code:
    mysql -u root -ppassw0rd asterisk -e "show table status"
    mysql -u root -ppassw0rd mysql -e "show table status"
     
  11. billsimon

    billsimon Experienced in Asterisk, FreePBX, and SIP

    Joined:
    Jan 2, 2011
    Messages:
    885
    Likes Received:
    268
    Did you actually try to restore this or by "worked flawlessly" you mean the backup ran without errors?
     
  12. kyle95wm

    kyle95wm Phone Genius Owner

    Joined:
    Apr 16, 2016
    Messages:
    444
    Likes Received:
    83

Share This Page