Merge pull request #11 from LCTT/master

更新2014年5月30日
This commit is contained in:
shipsw 2014-05-30 16:44:50 +08:00
commit 99fc82b5aa
6 changed files with 454 additions and 194 deletions

View File

@ -1,3 +1,4 @@
No one wanna get it? OK. Let me do it. GOLinux ...
Linux Pros' Top Command Line Secrets
================================================================================
![](http://www.linuxinsider.com/images/rw509807/command-line.jpg)
@ -109,4 +110,4 @@ via: http://www.linuxinsider.com/story/80437.html?rss=1
[10]:http://mrpogson.com/
[11]:http://en.wikipedia.org/wiki/GUI
[12]:http://twitter.com/noyesk
[13]:https://plus.google.com/+KatherineNoyes?rel=author
[13]:https://plus.google.com/+KatherineNoyes?rel=author

View File

@ -1,193 +0,0 @@
Translating-----------geekpi
Setup Backup Server Using Bacula And Webmin On Ubuntu 14.04
================================================================================
**Bacula** is an open source network backup solution that permits you to backup and restore the datas from a local or group of remote networked computers. It is very easy in terms of installation and configuration with many advanced storage management features.
In this tutorial, let us see how to install and configure Bacula on Ubuntu 14.04 server. My test box IP address is **192.168.1.250/24**, and hostname is **server.unixmen.local**. Well, now let me get us into the tutorial.
### Install Bacula ###
Bacula uses an SQL database to manage its information. We can use either MySQL or PostgreSQL database. In this tutorial, I use MySQL server.
Enter the following command to install MySQL server.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server
During MySQL installation, youll be asked to set the database administrator password. Enter the password and click Ok.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0012.png)
Re-enter the password:
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0021.png)
Now, let us install bacula using the following command:
sudo apt-get install bacula-server bacula-client
By default, Bacula uses Postfix MTA. During installation, youll be asked to configure Postfix.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0031.png)
Select Internet Site and click Ok.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0041.png)
Enter server fully qualified name(FQDN):
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0051.png)
Now, select Yes to configure database for Bacula with dbconfig-common.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_006.png)
Enter the MySQL database administrator password:
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0071.png)
Set password for bacula-director-mysql to register with the database server. If left blank, a random password will be generated.
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0081.png)
Re-enter the password:
![](http://180016988.r.cdn77.net/wp-content/uploads/2014/05/sk@server-_0091.png)
### Create Backup and Restore Directories ###
Now, let us backup and restore directories.
sudo mkdir -p /mybackup/backup /mybackup/restore
Set permissions and ownership to the above directories:
sudo chown -R bacula:bacula /mybackup/
sudo chown -R 700 /mybackup/
### Configure Bacula ###
Bacula has many configuration files which we have to configure.
**Update Bacula Director configuration:**
sudo vi /etc/bacula/bacula-dir.conf
Find the following section, and update the restore path. In our case,** /mybackup/restore** is my restore location.
[...]
Job {
Name = "RestoreFiles"
Type = Restore
Client=server-fd
FileSet="Full Set"
Storage = File
Pool = Default
Messages = Standard
Where = /mybackup/restore
}
[...]
Scroll down to “list of files to be backed up” section, and set the path of the directory to backup. For this tutorial, I want to backup the “**/home/sk**” directory. So, I included this directory path in the “File” parameter.
[...]
# 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
}
[...]
Scroll down further, fins the section **Exclude** section. Set the list of directories to be excluded from the backup. Here, I excluded the backup folder **/mybackup** directory from being backed up.
[...]
# 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
}
}
[...]
Save and close file.
**Update Bacula Storage Daemon settings:**
Edit **/etc/bacula/bacula-sd.conf**,
sudo vi /etc/bacula/bacula-sd.conf
Set the backup folder location. i.e **/mybackup/backup** in our case.
[...]
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;
}
[...]
Now, check if all the configurations are valid as shown below. If the commands displays nothing, the configuration changes are valid.
sudo bacula-dir -tc /etc/bacula/bacula-dir.conf
sudo bacula-sd -tc /etc/bacula/bacula-sd.conf
Once you done all the changes, restart all bacula services.
sudo /etc/init.d/bacula-director restart
sudo /etc/init.d/bacula-fd restart
sudo /etc/init.d/bacula-sd restart
Thats it. Now, bacula has been installed and configured successfully.
### Manage Bacula Using Webmin ###
Managing and working with Bacula via command line is bit difficult. So let use a graphical system administration tool called “webmin” to ease our tasks.
Follow the below link to install Webmin on Ubuntu 14.04.
- [Install Webmin on Ubuntu 14.04 LTS][1]
注:此链接文章在另一篇里,如果也翻译发布了,那么可以更改这个链接地址
Now, go to the Webmin interface using URL https://ip-address:10000. Go to the System tab on the left pane and click on the Module configuration link. If it not found under system, search it from the unused modules section.
![](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)
Select MySQL in the database section. Enter the MySQL database administrator password, and click Save button.
![](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)
Thats it. Now youll be able to configure Bacula from webmin easily. Start adding backup clients, volumes and schedule the jobs.
![](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)
Cheers!
--------------------------------------------------------------------------------
via: http://www.unixmen.com/setup-backup-server-using-bacula-webmin-ubuntu-14-04/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.unixmen.com/install-webmin-ubuntu-14-04/

View File

@ -0,0 +1,35 @@
Fix “Cannot Add PPA” Error In Ubuntu 14.04 & Linux Mint
================================================================================
![](http://itsfoss.itsfoss.netdna-cdn.com/wp-content/uploads/2014/05/PPA_Error_Ubuntu.jpeg)
A regular reader of Its FOSS, Chetan Jain contacted me today with this question: How can I fix “Cannot add PPA” error in Ubuntu 14.04. Chetan was trying to install [TLP (power management tool to reduce overheting)][1] and encountered this error:
chetan@Inspiron-3521:~$ sudo add-apt-repository ppa:linrunner/tlp
Cannot add PPA: ppa:linrunner/tlp.
Please check that the PPA name or format is correct.
If you encounter similar error while adding a PPA in Ubuntu or Mint, dont worry. Its one of the (less) common issue with PPA and can be solved easily.
### Fix Cannot add PPA error in Ubuntu and Linux Mint ###
There can be mainly two reasons behind this kind of error. Either the CA certificates on your system are broken or there is a proxy set up in your network.
Lets first try to reinstall the CA certificates:
sudo apt-get install --reinstall ca-certificates
If the above command doesnt work, perhaps there is proxy settings involved. To pass proxy settings to sudo, use it with E option in the following manner:
sudo -E add-apt-repository ppa:linrunner/tlp
This will get the PPA working. Chetans issue was solved with the second solution. I hope this quick tip help you as well to get rid of the PPA error. Any questions or suggestions are always welcomed.
--------------------------------------------------------------------------------
via: http://itsfoss.com/fix-add-ppa-error-ubuntu-1404-linux-mint/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://itsfoss.com/solve-overheating-issue-battery-life-ubuntu-1304/

View File

@ -0,0 +1,142 @@
How To Install Linux On A MacBook Pro Retina
================================================================================
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/linux-macbook-pro-retina-840x420.jpg?ec7b17)
MacBook Pros come with some very nice hardware, but some people want more. Some people want Linux.
Whether youd like a more open and customizable operating system or simply need to dual-boot in order to access certain software, you might want Linux on your MacBook. The thing is, MacBook Pros are also pretty closed-down pieces of hardware that make installing other operating systems difficult Linux more so than Windows. Boot Camp wont help you with Linux, even though it doesnt mean its impossible. Heres how to do it.
### Why Install Linux On A MacBook Pro Retina? ###
The reasoning for installing Linux on a MacBook Pro might seem a bit strange at first isnt OS X one of the main reasons to get a Mac? That might be true, but another great reason to get a Mac is the hardware. They offer excellent performance, superb battery life, and long durability. For the ones with a Retina display, youre also wanting a HiDPI experience for ultra-crisp photos and text.
But if you dont like Mac OS X, or simply need to use Linux, you may want to put another operating system on that Mac hardware. Linux is lean, open, and highly customizable. Who says that you cant bring the two together in a happy marriage? Well, Apple might have a word to say about that, but you probably dont care anyways.
Note: For the purposes of this tutorial, well be using Ubuntu, the [most popular Linux distribution][1], as our preferred choice. Youre free to choose a different distribution, but you can then only follow these steps are generic guidelines and not exact instructions. We claim no responsibility for any damage that is done to your system. Additionally, this tutorial assumes that you want to dual-boot between Linux and Mac OS X. Its recommended to keep Mac OS X on the hard drive so that you can update the firmware if needed — something you cannot do in Linux.
Before we even start with the first step, make sure that your computer is backed up in case anything goes wrong. How you do this is up to you, so feel free to use Time Machine, CrashPlan, or whatever else you might prefer.
### Download Ubuntu ###
First, youll want to get a [copy of the Ubuntu desktop ISO image][2]. Be sure to choose the 64-bit desktop flavor, and not the image made for Macs. The regular image can boot up in BIOS and EFI modes, while the Mac image can only boot up in BIOS mode. This was done on purpose for some Macs, but we want to be able to boot it up in EFI mode.
### Write to USB Drive ###
Next, grab a USB flash drive that is at least 2GB large well use this to boot up the Ubuntu installer on. To make this drive you can follow [the official Ubuntu steps][3], or [use the dedicated GUI tool for the job][4].
### Resize Partitions ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_disk_utility.jpg?ec7b17)
nce youve done that, you can get your MacBook Pro ready for the installation. Open up the Disk Utility, click on your hard drive on the left side, and then choose the Partitions tab. Resize the Mac partition to whatever size youd like it to be — well use the newly created free space to install Ubuntu.
### Boot Up Ubuntu Image ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_boot.jpg?ec7b17)
After thats completed, plug in the USB flash drive you prepared and restart your MacBook Pro. Be sure to hold down the Options button from when the screen blanks out for a second to when you see a screen with various boot options. Choose the EFI option (the left one in case you see two of them) to boot up your Ubuntu USB flash drive.
When prompted to choose between “Try Ubuntu” and “Install Ubuntu”, choose “Try Ubuntu” because well need to perform a step after the installer completes but before you restart the system.
### Installer ###
Once the Ubuntu desktop loads, start the installer and go through it normally until you reach the partitioning step. If you cannot access WiFi, its because Ubuntu currently doesnt recognize your WiFi chipset. Dont worry we dont need to have Internet access right now, and itll detect the right driver to use whenever you boot up into your new installation later on.
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_installer_partitions.jpg?ec7b17)
Once you come to the partitioning step, choose to “Do something else”. Then, make sure that the small partition thats ~128MB large is recognized as an EFI boot partition (you can check by clicking on it and choosing Options; additionally, that should be /dev/sda1). Next, you can create an ext4 partition in the new space and have the path “/” be mounted to it. You can also create multiple partitions here if you prefer that and know what youre doing.
Before you continue to the next step, make sure that the bootloader installation location says /dev/sda1, as you want GRUB to be installed into that partition. Then, finish off the installation like normal.
### EFI Boot Fix ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_efibootmgr.jpg?ec7b17)
When the installer completes, dont restart just yet! We still need to do one more thing so that well be able to use GRUB. Run the following command:
sudo apt-get install efibootmgr
This will temporarily install a configuration tool for EFI boot setups. Next, run
sudo efibootmgr
This will print out the current boot configuration to your screen. In this, you should be able to see “ubuntu” and “Boot0000*”. Currently, the EFI system will point to Boot0080*, which skips GRUB and goes directly to Mac OS X. To fix this, run the command
sudo efibootmgr -o 0,80`
Now you can restart!
Congratulations! Your Ubuntu installation should now be working! However, there are a few tweaks that you can perform to have a better experience.
### Various Tweaks ###
First, youll need to make a quick change to a GRUB setting so that the SSD wont occasionally freeze. Type
sudo nano /etc/default/grub
in a terminal, and then find the line with **GRUB_CMDLINE_LINUX** and change it to **GRUB_CMDLINE_LINUX="libata.force=noncq"**. Hit CTRL+X to save, and Y then Enter to confirm. Then, youll want to type
sudo nano /etc/grub.d/40_custom
into the terminal, which will open up a new file. In it, type this exactly:
menuentry "Mac OS X" {
exit
}
This will allow you to boot into your Mac OS X installation (the 32-bit and 64-bit entries in GRUB do not work). Do the same thing to save and exit, then type in
sudo update-grub
for the changes to go into effect. Finally, restart your system for good measure.
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_small_retina.jpg?ec7b17)
As you can see, everything is ridiculously small on the Retina display. To fix this, System Settings > Display and change the scaling factor to something larger. On the Retina screen, everything will look extremely tiny and it will make your life much more difficult if you dont change it to something you like.
You may also find that its difficult to grab the edges of a window for resizing. This can also be changed. Type
sudo nano /usr/share/themes/Ambiance/metacity-1/metacity-theme-1.xml
into a terminal, and then change these values appropriately:
<distance name="left_width" value="4"/>
<distance name="right_width" value="4"/>
<distance name="bottom_height" value="4"/>
If thats not big enough, you can also change those values to “6″ instead.
Finally, if you experience any washed out colors, you can grab the display color profile from Mac OS X and use it in Ubuntu. Mount your Mac OS X drive and navigate to
/Library/ColorSync/Profiles/Displays/Color LCD-xxxxxx.icc
where xxxxxx is some random string (there should only be one file anyways, but this string gets randomized). Copy it into your Ubuntu home folder, and then go to System Settings > Color and choose Add New Profile and choose the profile you saved in your home folder.
### Conclusion ###
![](http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2014/05/mac_linux_final.jpg?ec7b17)
Congratulations! You now have a great working Linux installation on your MacBook Pro Retina! Feel free to make additional tweaks to [make Ubuntu feel more like home][5]. Im sure that these instructions can be applied to other Mac systems, but each new release has its own pitfalls and advantages. If you use a different machine, its a good idea to look up some documentation first, such as [this][6] for Ubuntu.
Additionally, feel free to check out [other great Linux distros][7] that you can install to your Mac!
Have you installed Linux on a Mac? What problems did you encounter and how did you solve it? Let us know in the comments!
Image Credits: [K?rlis Dambr?ns][8] Via Flickr
--------------------------------------------------------------------------------
via: http://www.makeuseof.com/tag/install-linux-macbook-pro/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.makeuseof.com/tag/windows-xp-users-switch-ubuntu-14-04-lts-trusty-tahr/
[2]:http://www.ubuntu.com/download/desktop/
[3]:http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
[4]:http://www.makeuseof.com/tag/how-to-boot-a-linux-live-usb-stick-on-your-mac/
[5]:http://www.makeuseof.com/tag/11-tweaks-perform-ubuntu-installation/
[6]:https://help.ubuntu.com/community/MacBookPro
[7]:http://www.makeuseof.com/pages/best-linux-distributions
[8]:https://www.flickr.com/photos/janitors/10037346335

View File

@ -0,0 +1,85 @@
Linux script command - A recorder inside your Terminal
================================================================================
When you are working on the terminal or console, you may want to record what you have done in the terminal. The recording can be used as a documentation about what happen in terminal. Let say you are working together with some Linux Administrators at the same time. Or you let someone to remote your server. You may want to record about what happen in the terminal. To do this, you can use script command.
### What is script ###
script is a command that make a typescript that printed in the terminal. It is useful for everyone who need a hardcopy record of the session that happened in the terminal. This record can be saved and printed out later.
### How to use it ###
By default, we can start script with typing script on the terminal.
pungki@dev-machine:~$ script
Script started, file is typescript
pungki@dev-machine:~$
You can also define a destination filename to write the result of typescript.
pungki@dev-machine:~$ script myfile
![Define script file](http://linoxide.com/wp-content/uploads/2014/03/start_script.png)
When you received a command prompt again, it means the terminal will record anything that is printed in terminal.
You will see in the current directory, there is a file named typescript.
### Why we use script command ###
As we mention before, script has main function to record everything. Heres two samples of scenarios why we are using it.
#### Collaborate with colleague ####
When working together with your colleague, we can record your activity with script.
Let say we will use a typescript file called **collaborate**. To do that type :
$ script collaborate
![Create collaborate file](http://linoxide.com/wp-content/uploads/2014/03/collaborate.png)
Then after doing some tasks, let say you need to send your work to another engineer. Just send the file. So when the other engineer need to review what was done, he can just open the file using a text editor.
If he want to update the file, he can use **-a** option.
$ script -a collaborate
![Append the file](http://linoxide.com/wp-content/uploads/2014/03/collaborate_append.png)
#### Record someone activity in the terminal ####
You may let your engineer or someone to enter your system remotely. To make sure that your engineer are doing right, you can record what he had done to your system. To make the script command run automatically upon login, we can add it on your shell profile. If you are using **bash** shell, add this line into your bash profile.
$ vi ~/.profile
# run the script command to record everything
# use -q for quite and -a option to append the script
#
/usr/bin/script -qa /usr/local/script/log_record_script
![Add script to bash profile](http://linoxide.com/wp-content/uploads/2014/03/script_login.png)
Then save it. Next time he logged in to your system, script command will automatically run and put the log on the **/usr/local/script/log_record_script**
![Script without notification](http://linoxide.com/wp-content/uploads/2014/03/remote_script_quite.png)
The option **-q** will run script command in quite mode. The user who logged in will not have any notification that the script command is run. While **-a** option will add the record without erasing the previous record.
If we dont use **-q** option, then when the user logged on, the user will get a notification about script as the picture below.
![Script with notification](http://linoxide.com/wp-content/uploads/2014/03/remote_script.png)
### Quit recording ###
To exit the record activity, we can press **Ctrl+D** button or type **exit** from the terminal. Before you exit from script, you will find the size of the record file is 0 Kb. After you exit from script, the file size will change.
### Conclusion ###
Script command may useful when you need to record or documenting what happen in the terminal. The record file will be stored as a text file, so it will easy to open it with any text editor. As usual, we can always type **man script** or **script -h** to display its manual page and explore it more detail.
--------------------------------------------------------------------------------
via: http://linoxide.com/linux-command/script-command-recorder/
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出

View File

@ -0,0 +1,190 @@
在Ubuntu 14.04 上使用Bacula和Webmin设置备份服务器
================================================================================
**Bacula**是一个开源网络备份解决方案,允许你在本地或者远程计算机组上备份或者还原数据。许多高级存储管理特性配置与安装是很容易的。
主机名是**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)
输入服务器完整网域名称:
![](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) 校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[1]:http://www.unixmen.com/install-webmin-ubuntu-14-04/