返回列表 發帖
回復 36# 角色


Do you like a simple bash script to tar every directory?

TOP

這是非常簡單的 scripts? 重點是不用擔心 MBR overwrite during partition image restore. 架server係 backup 時仲行緊。

Restore 完全冇問題,所以可以放心。

TOP

回復 38# bubblestar

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

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

TOP

This is a file/directory backup.

How to restore is
tar zxvf /path/zxvf/dev.tgz

Remember in linux, we do not have registry. All settings are in file based. Only when online, some of the files in /dev and /proc are temporary files created during execution. They can usually be able to back up.

So realtime backup is possible

TOP

The next question is how to quickly restore your system
1. ghost or true image backup / restore is easy to perform and usually very fast. One of the drawbacks I encountered before is the partition after restore may not be bootable in a multi boot environment. Very often when a partition is deleted and re-created, the order in partition table may be changed. In my case, I always write the linux grub boot loader in /dev/sda? or /dev/hda? instead of the MDR i.e. /dev/sda or dev/hda. Hence, this changes in order may result in not bootable restore

2. If I use script, I can control the location of restore and then issue command like this
grub-install --recheck
grub-install /dev/sda1

the first command shows me the bootable partition.

TOP

For ghost and True image backup, you need to shut down your linux server and reboot into the program

TOP

回復 50# 角色

YH,

Follow my method, it will be very fast

TOP

回復 52# 角色

I encounter this before. Let me think about

TOP

對,這是你的努力!

TOP

回復 61# 角色


    Should be RTP ports

TOP

Tired. So many things to configure. Try to log your records to mysql.

TOP

回復 69# 角色

太客氣,我都有自已問題解決不了

TOP

回復 71# 角色

Please follow my thread for the startup commands.

TOP

回復 70# ckleea

問題始終有解決方法,是否各施各法,決定於個人喜好。

剛剛解決了 Centos 6 and Asterisk + GUI 安裝,現在會做一次 backup 先,然後再加上去。

TOP

沒有你的帶領,我估茶館唔會發展那麼快!

TOP

返回列表