返回列表 發帖

備份方案

搞了很久,誤打誤撞大概搞定elastix. 但日後難免想加新東西,怕又搞亂了。所以想問該如何備份呢?回覆的過程如何?

Are you using linux based version? What I am doing is to have  scripts for the following
1. full server backup
2. selective backup of database and config files

It runs every day and every week depending on your need.

TOP

Yes, I am using Linux based version, which is a guest OS in VM.
Can you share your strips of backup?

TOP

  1. #!/bin/bash
  2. bpath=/backup  
  3. DTE=`date +%Y%m%d`
  4. export bpath
  5. export DTE
  6. mkdir $bpath/$DTE
  7. cd $bpath/$DTE

  8. tar zcvf agispeedy.tgz /agispeedy
  9. tar zcvf bin.tgz /bin
  10. tar zcvf boot.tgz /boot
  11. tar zcvf command.tgz /command
  12. tar zcvf dev.tgz /dev
  13. tar zcvf etc.tgz /etc
  14. tar zcvf home.tgz /home
  15. tar zcvf lib.tgz /lib
  16. tar zcvf media.tgz /media
  17. tar zcvf misc.tgz /misc
  18. tar zcvf mnt.tgz /mnt
  19. tar zcvf opt.tgz /opt
  20. tar zcvf proc.tgz /proc
  21. tar zcvf root.tgz /root
  22. tar zcvf sbin.tgz /sbin
  23. tar zcvf selinux.tgz /selinux
  24. tar zcvf service.tgz /service
  25. tar zcvf srv.tgz /srv
  26. tar zcvf sys.tgz /sys
  27. tar zcvf usr.tgz /usr
  28. tar zcvf var.tgz /var
  29. tar zcvf web.tgz /web

  30. cp /opt/script/restore .

  31. echo "Remember to update the restore script"
複製代碼

TOP

The above script has been used by me for long time. It is not fully automatic because restore process is rather manual. However, I have not problem to do this.

You may copy the above into a text file
chmod a+x textfile
then use webmin to set it to run at weekly base.

TOP

回復 4# ckleea


   
I am interested in the second last statement of your restore script.  Could you elaborate and share with us as well?  Thanks.

TOP

回復 6# bubblestar

my restore scripts as follow
  1. #!/bin/bash
  2. bpath=/backup/
  3. export bpath

  4. tar zxvf $bpath/agispeedy.tgz
  5. tar zxvf $bpath/bin.tgz
  6. tar zxvf $bpath/boot.tgz
  7. tar zxvf $bpath/command.tgz
  8. tar zxvf $bpath/dev.tgz
  9. tar zxvf $bpath/etc.tgz
  10. tar zxvf $bpath/home.tgz
  11. tar zxvf $bpath/lib.tgz
  12. tar zxvf $bpath/media.tgz
  13. tar zxvf $bpath/misc.tgz
  14. tar zxvf $bpath/mnt.tgz
  15. tar zxvf $bpath/opt.tgz
  16. tar zxvf $bpath/proc.tgz
  17. tar zxvf $bpath/root.tgz
  18. tar zxvf $bpath/sbin.tgz
  19. tar zxvf $bpath/selinux.tgz
  20. tar zxvf $bpath/service.tgz
  21. tar zxvf $bpath/srv.tgz
  22. tar zxvf $bpath/sys.tgz
  23. tar zxvf $bpath/usr.tgz
  24. tar zxvf $bpath/var.tgz
  25. tar zxvf $bpath/web.tgz
  26. tar zxvf $bpath/tmp.tgz
複製代碼
The restore scripts have to be modified to suit individual need. For me, I seldom restore. Only 2 episodes - recently because my server starts crazy in not able to send email and about 1.5 years ago when I switch the hardware from one ATOM machine to another ATOM machine with new chipset.

The beauty of having a linux system is that Most files are text based (no registry or binary codes), installation, backup and restore are much simple.

TOP

Thank you very much!

TOP

You need to adapt to your requirement.

If you are using VM, you may mount a host directory into the VM, then backup to that directory.

For restore, you need to boot from an linux iso and works out the path, partition.

But the simplest way in VM is just make a snapshot or shutdown for a while and duplicate the VM imagw

TOP

Successfully grasp the technique to restore Asterisk server from 1 partition in an old HDD to another different partition in new HDD now.

Thanks ckleea C-hing for his great hints.

TOP

返回列表