mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
a71aa7de9e
renamed: 10 Linux Platforms Meant For Embedded Systems.md -> 201406/10 Linux Platforms Meant For Embedded Systems.md renamed: 20140527 4MLinux 9.0 Beta Is a 55 MB Operating System That Has It All.md -> 201406/20140527 4MLinux 9.0 Beta Is a 55 MB Operating System That Has It All.md renamed: 20140527 A Complete Historical Timeline of Linux Evolution.md -> 201406/20140527 A Complete Historical Timeline of Linux Evolution.md renamed: 20140528 Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04.md -> 201406/20140528 Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04.md renamed: 20140528 Why We Shouldn't Accept Bad Linux Ports.md -> 201406/20140528 Why We Shouldn't Accept Bad Linux Ports.md renamed: 20140529 Add Windows Like Bottom Taskbar In Ubuntu Unity 14.04.md -> 201406/20140529 Add Windows Like Bottom Taskbar In Ubuntu Unity 14.04.md renamed: 20140529 Command Line Tuesdays--The Introductory.md -> 201406/20140529 Command Line Tuesdays--The Introductory.md renamed: 20140529 How To Share Disks In VirtualBox Between Linux Guest OS.md -> 201406/20140529 How To Share Disks In VirtualBox Between Linux Guest OS.md renamed: 20140529 Install RainLoop Webmail (A Web Based Email Client) using 'Nginx and Apache' in Arch Linux.md -> 201406/20140529 Install RainLoop Webmail (A Web Based Email Client) using 'Nginx and Apache' in Arch Linux.md renamed: 20140529 What is a good terminal emulator on Linux.md -> 201406/20140529 What is a good terminal emulator on Linux.md renamed: 20140529 Why No Flash Support for Linux Is Good for Open Source.md -> 201406/20140529 Why No Flash Support for Linux Is Good for Open Source.md renamed: 20140530 Fix 'Cannot Add PPA' Error In Ubuntu 14.04 and Linux Mint.md -> 201406/20140530 Fix 'Cannot Add PPA' Error In Ubuntu 14.04 and Linux Mint.md renamed: 20140530 How To Install Linux On A MacBook Pro Retina.md -> 201406/20140530 How To Install Linux On A MacBook Pro Retina.md renamed: 20140530 Linux script command--A recorder inside your Terminal.md -> 201406/20140530 Linux script command--A recorder inside your Terminal.md renamed: 20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md -> 201406/20140603 App Grid Is A Superior Ubuntu Software Center Alternative.md renamed: 20140603 Linux Foundation to donate portion of membership fees to Code.org.md -> 201406/20140603 Linux Foundation to donate portion of membership fees to Code.org.md renamed: 20140603 Write your first Linux Kernel module.md -> 201406/20140603 Write your first Linux Kernel module.md renamed: 20140604 Command line secrets.md -> 201406/20140604 Command line secrets.md renamed: 20140604 Setup Virtual Hosts In Apache On Ubuntu 14.04 LTS.md -> 201406/20140604 Setup Virtual Hosts In Apache On Ubuntu 14.04 LTS.md renamed: 20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md -> 201406/20140607 Cup 2014 Brazil--Watch FIFA World Cup 2014 Competition in Your Linux Desktop.md renamed: 20140607 How To Extract Images From Videos Using ffmpeg.md -> 201406/20140607 How To Extract Images From Videos Using ffmpeg.md renamed: 20140607 How To Install iCup 2014 In Linux.md -> 201406/20140607 How To Install iCup 2014 In Linux.md renamed: 20140607 Linux--Bash Delete All Files In Directory Except Few.md -> 201406/20140607 Linux--Bash Delete All Files In Directory Except Few.md renamed: 20140607 New OpenSSL breach is no Heartbleed-but needs to be taken seriously.md -> 201406/20140607 New OpenSSL breach is no Heartbleed-but needs to be taken seriously.md renamed: 20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md -> 201406/20140607 Nuvola Player 2.4.0 Released -- A Online Cloud Music Player for Linux.md renamed: 20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md -> 201406/20140607 Practical Interview Questions and Answers on Linux Shell Scripting.md renamed: 20140607 Steam Hits The Big 500 For Linux Games.md -> 201406/20140607 Steam Hits The Big 500 For Linux Games.md renamed: 20140607 Ubuntu One Formally Shuts Down.md -> 201406/20140607 Ubuntu One Formally Shuts Down.md renamed: 20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md -> 201406/20140609 How To Know If Your System Has USB 3.0 Port In Linux [Quick Tip].md renamed: 20140609 Open Source LDAP Solutions.md -> 201406/20140609 Open Source LDAP Solutions.md renamed: "20140609 OpenELEC 4.0.4 \347\216\260\345\267\262\345\217\221\345\270\203, \345\237\272\344\272\216 XBMC 13.1 \342\200\234Gotham\342\200\235.md" -> "201406/20140609 OpenELEC 4.0.4 \347\216\260\345\267\262\345\217\221\345\270\203, \345\237\272\344\272\216 XBMC 13.1 \342\200\234Gotham\342\200\235.md" renamed: 20140610 How to set up Internet connection sharing with iptables on Linux.md -> 201406/20140610 How to set up Internet connection sharing with iptables on Linux.md renamed: 20140610 IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes.md -> 201406/20140610 IPFire 2.13 Core 78 Linux Firewall OS Receives OpenSSL Fixes.md renamed: 20140610 Open Source SDN Project OpenDaylight Adds New Members.md -> 201406/20140610 Open Source SDN Project OpenDaylight Adds New Members.md renamed: 20140610 Top 7 Desktop Environment For Linux.md -> 201406/20140610 Top 7 Desktop Environment For Linux.md renamed: 20140611 HTG Explains--What' s the Difference Between Linux and BSD.md -> 201406/20140611 HTG Explains--What' s the Difference Between Linux and BSD.md renamed: 20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md -> 201406/20140611 How to Prevent Other Users From Accessing Your Home Directory in Ubuntu 14.04.md renamed: 20140612 Command Line Tuesdays--Part One.md -> 201406/20140612 Command Line Tuesdays--Part One.md renamed: 20140612 Dpkg Vulnerabilities Closed in Ubuntu 14.04.md -> 201406/20140612 Dpkg Vulnerabilities Closed in Ubuntu 14.04.md renamed: 20140616 How To Install Numix Icon Theme In Fedora 20.md -> 201406/20140616 How To Install Numix Icon Theme In Fedora 20.md renamed: 20140616 Ubuntu Desktop Next 14.10 Images Available to Download.md -> 201406/20140616 Ubuntu Desktop Next 14.10 Images Available to Download.md renamed: 20140616 Ubuntu for Phones Activated on 10,000 Devices.md -> 201406/20140616 Ubuntu for Phones Activated on 10,000 Devices.md renamed: 20140617 14 Apps To Boost Ubuntu.md -> 201406/20140617 14 Apps To Boost Ubuntu.md renamed: 20140619 Improve Battery Life with Laptop Mode Tools 1.65.md -> 201406/20140619 Improve Battery Life with Laptop Mode Tools 1.65.md renamed: 20140619 Red Hat to Acquire eNovance, Focus Together on OpenStack.md -> 201406/20140619 Red Hat to Acquire eNovance, Focus Together on OpenStack.md renamed: 20140620 Celebrating 30 Years of X.md -> 201406/20140620 Celebrating 30 Years of X.md renamed: 20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md -> 201406/20140620 ENCRYPT DNS TRAFFIC IN LINUX WITH DNSCRYPT (VIA OPENDNS).md renamed: 20140620 How to enable testing and unstable repository on Debian.md -> 201406/20140620 How to enable testing and unstable repository on Debian.md renamed: 20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md -> 201406/20140625 Canonical Debuts 'Orange Box' for Ubuntu OpenStack Cloud Demos.md renamed: 8 examples of findmnt command to check mounted file systems on Linux.md -> 201406/8 examples of findmnt command to check mounted file systems on Linux.md renamed: Bash Getopts--Scripts with Command Line Options.md -> 201406/Bash Getopts--Scripts with Command Line Options.md renamed: Collectl--An Advanced All-in-One Performance Monitoring Tool for Linux.md -> 201406/Collectl--An Advanced All-in-One Performance Monitoring Tool for Linux.md renamed: Fix Adobe Flash Player Issue In Chromium In Ubuntu 14.04.md -> 201406/Fix Adobe Flash Player Issue In Chromium In Ubuntu 14.04.md renamed: Guide To Install Ubuntu 14.04 In Dual Boot Mode With Windows 8 Or 8.1 UEFI.md -> 201406/Guide To Install Ubuntu 14.04 In Dual Boot Mode With Windows 8 Or 8.1 UEFI.md renamed: How To Install 'California' Calendar App in Ubuntu 14.04.md -> 201406/How To Install 'California' Calendar App in Ubuntu 14.04.md renamed: How To Remove Drive Icons From Unity Launcher In Ubuntu 14.04 [Beginner Tips].md -> 201406/How To Remove Drive Icons From Unity Launcher In Ubuntu 14.04 [Beginner Tips].md renamed: How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer.md -> 201406/How to Install Windows 8.1 and Ubuntu 14.04 LTS on the Same Computer.md renamed: How to download webcomics from the command line on Linux.md -> 201406/How to download webcomics from the command line on Linux.md renamed: How to launch applications differently with Gnome-Pie on Linux desktop.md -> 201406/How to launch applications differently with Gnome-Pie on Linux desktop.md renamed: How to manage Linux containers with Docker on Ubuntu.md -> 201406/How to manage Linux containers with Docker on Ubuntu.md renamed: How to manage ip addresses and subnets with phpIPAM.md -> 201406/How to manage ip addresses and subnets with phpIPAM.md renamed: How to manage passwords from the command line on Linux.md -> 201406/How to manage passwords from the command line on Linux.md renamed: How to monitor Nginx web server from the command line in real time.md -> 201406/How to monitor Nginx web server from the command line in real time.md renamed: How to set up a web-based lightweight system monitor on Linux.md -> 201406/How to set up a web-based lightweight system monitor on Linux.md renamed: How to take a screenshot from the command line on Linux.md -> 201406/How to take a screenshot from the command line on Linux.md renamed: How to take full length screenshots of websites via terminal.md -> 201406/How to take full length screenshots of websites via terminal.md renamed: How to use LVM in Linux.md -> 201406/How to use LVM in Linux.md renamed: How to verify DDOS attack with netstat command on Linux Terminal.md -> 201406/How to verify DDOS attack with netstat command on Linux Terminal.md renamed: Install SoundCloud In Ubuntu 14.04.md -> 201406/Install SoundCloud In Ubuntu 14.04.md renamed: Linux Pros' Top Command Line Secrets.md -> 201406/Linux Pros' Top Command Line Secrets.md renamed: Linux Terminal--Dstat monitoring tools.md -> 201406/Linux Terminal--Dstat monitoring tools.md renamed: Making Linux Feel at Home.md -> 201406/Making Linux Feel at Home.md renamed: Open Source's Cult Of Personality Is Dying--Thankfully.md -> 201406/Open Source's Cult Of Personality Is Dying--Thankfully.md renamed: Pros' Secrets and Red Hat 7 and PCLinuxOS 2014.05 Reviews.md -> 201406/Pros' Secrets and Red Hat 7 and PCLinuxOS 2014.05 Reviews.md renamed: Start Practising Linux ip command and Avoid the Habit of Using ifconfig.md -> 201406/Start Practising Linux ip command and Avoid the Habit of Using ifconfig.md renamed: TechView--Linus Torvalds Inventor of Linux.md -> 201406/TechView--Linus Torvalds Inventor of Linux.md renamed: Turn Off Bluetooth By Default In Ubuntu 14.04 [Quick Tip].md -> 201406/Turn Off Bluetooth By Default In Ubuntu 14.04 [Quick Tip].md renamed: Ubuntu Linux Community Manager Jono Bacon Leaves Canonical.md -> 201406/Ubuntu Linux Community Manager Jono Bacon Leaves Canonical.md renamed: What Heartbleed Teaches Us--Be An Open Source Contributor, Not Just A User.md -> 201406/What Heartbleed Teaches Us--Be An Open Source Contributor, Not Just A User.md renamed: Why htop Command Compete Linux top Command.md -> 201406/Why htop Command Compete Linux top Command.md
190 lines
6.4 KiB
Markdown
190 lines
6.4 KiB
Markdown
在Ubuntu 14.04 上使用Bacula和Webmin设置备份服务器
|
||
================================================================================
|
||
**Bacula**是一个开源网络备份解决方案,允许你在本地或者远程计算机组上备份或者还原数据。配置与安装很容易,并支持许多高级存储管理特性。
|
||
|
||
本教程中,让我们来学习一下如何在Ubuntu 14.04服务器上安装和配置Bacula。我的机器的IP是**192.168.1.250/24**,主机名是**server.unixmen.local**。现在让我们进入教程吧。
|
||
|
||
### 安装 Bacula ###
|
||
|
||
Bacula使用SQL数据库管理它的信息。我们可以使用MySQL或者PostgreSQL数据库。本篇教程中,我使用MySQL。
|
||
|
||
输入下面的命令安装MySQL服务器。
|
||
|
||
sudo apt-get update
|
||
sudo apt-get upgrade
|
||
sudo apt-get install mysql-server
|
||
|
||
在安装MySQL的过程中,可能提示需要输入数据库管理员密码。输入密码后按下OK。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0012.png)
|
||
|
||
重新输入密码:
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0021.png)
|
||
|
||
现在使用下面的命令安装bacula:
|
||
|
||
sudo apt-get install bacula-server bacula-client
|
||
|
||
Bacula默认使用Postfix MTA。安装过程中,你会被要求配置Postfix。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0031.png)
|
||
|
||
选择Internet站点并点击OK。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0041.png)
|
||
|
||
输入服务器完整域名(FQDN):
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0051.png)
|
||
|
||
现在输入yes用dbconfig-common来配置Bacula数据库。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_006.png)
|
||
|
||
输入MySQL数据库管理员密码:
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0071.png)
|
||
|
||
设置数据库的bacula-director-mysql用户的密码。如果留空不输入,会生成一个随机密码。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0081.png)
|
||
|
||
重新输入密码:
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0091.png)
|
||
|
||
### 创建备份与还原目录 ###
|
||
|
||
现在,让我们创建备份与还原目录。
|
||
|
||
sudo mkdir -p /mybackup/backup /mybackup/restore
|
||
|
||
设置上面目录的权限与所属用户/组:
|
||
|
||
sudo chown -R bacula:bacula /mybackup/
|
||
sudo chown -R 700 /mybackup/
|
||
|
||
### 配置 Bacula ###
|
||
|
||
Bacula有很多配置文件需要我们配置。
|
||
|
||
**更新 Bacula Director 配置:**
|
||
|
||
sudo vi /etc/bacula/bacula-dir.conf
|
||
|
||
找到下面的字段,并更新还原路径。本篇中,** /mybackup/restore**是我的还原位置。
|
||
|
||
[...]
|
||
Job {
|
||
Name = "RestoreFiles"
|
||
Type = Restore
|
||
Client=server-fd
|
||
FileSet="Full Set"
|
||
Storage = File
|
||
Pool = Default
|
||
Messages = Standard
|
||
Where = /mybackup/restore
|
||
}
|
||
[...]
|
||
|
||
滚动到“list of files to be backed up”字段,并设置备份的目录。本篇教程中,我希望备份“**/home/sk**”目录。所以我把这个目录包含进了“File”参数中。
|
||
|
||
[...]
|
||
|
||
# By default this is defined to point to the Bacula binary
|
||
# directory to give a reasonable FileSet to backup to
|
||
# disk storage during initial testing.
|
||
#
|
||
File = /home/sk
|
||
}
|
||
[...]
|
||
|
||
继续向下滚动,找到**Exclude** 字段,设置排除在备份目录外的目录列表。这里,我排除了目录**/mybackup**。
|
||
|
||
[...]
|
||
|
||
# If you backup the root directory, the following two excluded
|
||
# files can be useful
|
||
#
|
||
Exclude {
|
||
File = /var/lib/bacula
|
||
File = /nonexistant/path/to/file/archive/dir
|
||
File = /proc
|
||
File = /tmp
|
||
File = /.journal
|
||
File = /.fsck
|
||
File = /mybackup
|
||
}
|
||
}
|
||
[...]
|
||
|
||
保存并关闭文件。
|
||
|
||
**更新 Bacula 存储守护进程设置:**
|
||
|
||
编辑 **/etc/bacula/bacula-sd.conf**,
|
||
|
||
sudo vi /etc/bacula/bacula-sd.conf
|
||
|
||
设置备份目录位置,也就是本篇中的**/mybackup/backup**。
|
||
|
||
[...]
|
||
|
||
Device {
|
||
Name = FileStorage
|
||
Media Type = File
|
||
Archive Device = /mybackup/backup
|
||
LabelMedia = yes; # lets Bacula label unlabeled media
|
||
Random Access = Yes;
|
||
AutomaticMount = yes; # when device opened, read it
|
||
RemovableMedia = no;
|
||
AlwaysOpen = no;
|
||
}
|
||
[...]
|
||
|
||
现在如下检查是否所有的配置是有效的。如果下面的命令没有显示,那么配置就是有效的。
|
||
|
||
sudo bacula-dir -tc /etc/bacula/bacula-dir.conf
|
||
sudo bacula-sd -tc /etc/bacula/bacula-sd.conf
|
||
|
||
一旦你完成所有的设置,重启所有的bacula服务。
|
||
|
||
sudo /etc/init.d/bacula-director restart
|
||
sudo /etc/init.d/bacula-fd restart
|
||
sudo /etc/init.d/bacula-sd restart
|
||
|
||
就是这样。现在,bacula已经成功安装与配置了。
|
||
|
||
### 使用Webmin 管理 Bacula ###
|
||
|
||
使用命令行管理Bacula是有点困难的。所以我们使用一个图形化的管理工具“webmin”来简化我们的任务。
|
||
|
||
使用下面的命令在Ubuntu 14.04上安装Webmin。
|
||
|
||
- [在 Ubuntu 14.04 LTS上安装Webmin][1]
|
||
|
||
现在使用URL https://ip-address:10000进入Webmin界面。在左边的窗格中进入系统标签并点击模块配置链接。如果在系统下没有找到它,在未使用模块一栏中查找。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/Webmin-1.690-on-server.unixmen.local-Ubuntu-Linux-14.04-Mozilla-Firefox_002.png)
|
||
|
||
在数据库一栏中选择MySQL数据库。输入MySQL管理员密码,并点击保存。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/Webmin-1.690-on-server.unixmen.local-Ubuntu-Linux-14.04-Mozilla-Firefox_003.png)
|
||
|
||
就是这样。现在你可以在webmin中简单地配置Bacula了。开始加入备份客户端,磁盘卷和计划任务吧。
|
||
|
||
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/Webmin-1.690-on-server.unixmen.local-Ubuntu-Linux-14.04-Mozilla-Firefox_004.png)
|
||
|
||
干杯!
|
||
|
||
--------------------------------------------------------------------------------
|
||
|
||
via: http://www.unixmen.com/setup-backup-server-using-bacula-webmin-ubuntu-14-04/
|
||
|
||
译者:[geekpi](https://github.com/geekpi) 校对:[wxy](https://github.com/wxy)
|
||
|
||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||
|
||
[1]:http://linux.cn/article-3113-1.html
|