Installing and Configuring Remote backup using Bacula on an Ubuntu 14.04

By | April 10, 2016

Installing and Configuring Remote backup using Bacula on an Ubuntu 14.04

Server Name : BackupServer
Client Name : ClientMachine

Client Installation
$ sudo apt-get update
$ sudo apt-get install bacula-client
Client Machine Configuration
$ sudo vim /etc/bacula/bacula-fd.conf (all below entried put in same file)

search : “Director” section.

Director {
Name = BackupServer-dir #change Server name before -dir.
Password = “u2LK-yBrQzfiEsc6NWftHEhymmdPWsklN” # Copy this password for later reference!
}

note: Password may be differant & copy this password for server configaration later.

search : “FileDaemon” section.

FileDaemon { # this is me
Name = ClientMachine-fd # give here client machine name before -fd
FDport = 9102 # where we listen for the director
WorkingDirectory = /var/lib/bacula
Pid Directory = /var/run/bacula
Maximum Concurrent Jobs = 20
FDAddress = ClientMachine.DomainName.com #change FDAddress parameter give client ip here.
}

note : Name parameter should already be populate correctly.

search : Messages section

Messages {
Name = Standard
director = BackupServer-dir = all, !skipped, !restored
}

note : change the “director” parameter to match your backup server’s name.
—————————| save & exit |———————————————-

Check that your configuration file has the correct syntax with the following command:
$ sudo bacula-fd /etc/bacula/bacula-fd.conf
Restart bacula daemon

$ sudo service bacula-fd restart

The client machine is now correctly configured.

make directory on client machine. change ownershiop

sudo mkdir -p /bacula/restore
sudo chown -R bacula:bacula /bacula
sudo chmod -R 700 /bacula
—————|now client configuration is over |—————————————

Backup Server Configuration
Log into the backup server to complete this stage of the configuration.
The bulk of the configuration is actually done on the backup server.
That is because the bacula “director” manages all other bacula
processes and must be able to communicate correctly with a number of different components.

$ sudo vim /etc/bacula/bacula-dir.conf
search : Job

** The current configuration is named “BackupClient1” change to “LocalBackup”

Job {
Name = “LocalBackup”
JobDefs = “DefaultJob”
}

note : Now that we have identified the first job as backing up on the local machine.
we want to create a similar job for backup up our remote client. To do this,
copy and paste the job definition below the one you just modified.
** copy above “Job” section and paste below with adding “Client” & “Pool” section.

Job {
Name = “RemoteBackup”
JobDefs = “DefaultJob”
Client = ClientMachine-fd
Pool = RemoteFile
}

define a place for the remote backups to restore. We will use the directory that
we created on the client machine to restore remote backups.
e.g. give client machine restore path in to this server configuration file.

Job {
Name = “RestoreRemote”
Type = Restore
Client=ClientMachine-fd # give client machine name before -fd.
FileSet=”Full Set”
Storage = File
Pool = Default
Messages = Standard
Where = /bacula/restore # this directory already configured on client machine.
}

———– Client Configuration on server ————-

We will change the “Address” parameter to reflect our actual backup
server IP address instead of using localhost.
The password should already be set correctly for the local machine.

search : “Client” definition.

Client {
Name = BackupServer-fd # backup server -fd name
Address = BackupServer.DomainName.com # backup server ip address
FDPort = 9102
Catalog = MyCatalog
Password = “CRQF7PW-mJumFtENX2lqGvJ6gixPTyRQp” # password for Local FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files

}
The next step is to actually define the client machine that we’ve been
referencing in our configuration.
Copy the Client entry we just modified paste it below the current definition.

Client {
Name = ClientMachine-fd # clientMachine -fd name
Address = ClientMachine.DomainName.com # Client machine ip address
FDPort = 9102
Catalog = MyCatalog
Password = “u2LK-yBrQzfiEsc6NWftHEhymmdPWsklN” # password for Remote FileDaemon
File Retention = 30 days # 30 days
Job Retention = 6 months # six months
AutoPrune = yes # Prune expired Jobs/Files
}

note : where you enter the password that you copied from the remote client’s
file daemon configuration file.

————— Storage Configuration on server —————–

search : Storage
** change “Address” parameter in the storage section with the ip address.
** password should already be correct here.

Storage {
Name = File
Do not use “localhost” here
Address = BackupServer.DomainName.com # N.B. Use a fully qualified name here
SDPort = 9103
Password = “097dnj3jw1Yynpz2AC38luKjy5QTnGoxS”
Device = FileStorage
Media Type = File
}

————— Pool Configuration on server——————

search : “Pool”

Pool {
Name = File
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
Label Format = Local- # add here “Local-” as a prefix.
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
}

————-copy above pool section and past below—————————

note : change the name of the new pool to reflect its job of storing remote backups.
Also, change the prefix by adjusting the “Label Format” parameter to be “Remote-”

Pool {
Name = RemoteFile
Pool Type = Backup
Recycle = yes # Bacula can automatically recycle Volumes
Label Format = Remote- # add here “Remote-” as a prefix.
AutoPrune = yes # Prune expired volumes
Volume Retention = 365 days # one year
Maximum Volume Bytes = 50G # Limit Volume size to something reasonable
Maximum Volumes = 100 # Limit number of Volumes in Pool
}
————————— Save & Close file ————————————-

Editing bacula-sd.conf
open the “bacula-sd.conf” file with root privileges:
search : storage
Storage { # definition of myself
Name = BackupServer-sd
SDPort = 9103 # Director’s port
WorkingDirectory = “/var/lib/bacula”
Pid Directory = “/var/run/bacula”
Maximum Concurrent Jobs = 20
SDAddress = BackupServer.DomainName.com # backup server ip address
}
—————————– Save & Close file —————————–

Checking the Configuration and Restarting Services.
Check the configuration with the following commands:
sudo bacula-dir /etc/bacula/bacula-dir.conf
sudo bacula-sd /etc/bacula/bacula-sd.conf
note : If no output is returned, the configuration files have valid syntax.

Restart service
sudo service bacula-director restart
sudo service bacula-sd restart

Testing Remote Backups on backup server
open bacula console to test backup fanctionality

$ sudo bconsole

** Test that the bacula director can connect to the remote machine by typing the following:

status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4):

** Choose #3 to check on the client connection and then select the remote machine:

3: Client

2: ClientMachine-fd

note : It should return a summary with some statistics, confirming that
we can connect to the remote file daemon.

** Run a test backup of the remote system by typing the following command:

*run

Automatically selected Catalog: MyCatalog
Using Catalog “MyCatalog”
A job name must be specified.
The defined Job resources are:
1: LocalBackup
2: RemoteBackup
3: BackupCatalog
4: RestoreFiles
5: RestoreRemote
Select Job resource (1-5):

** Select the “RemoteBackup” option to run a backup of the remote machine.
Type “yes” to begin the backup:

2: RemoteBackup

note : The director will send the backup task to the remote file daemon and
which will pass its information to the backup server’s storage daemon.
You should also check the messages using the “messages” command.

messages
If you continue to check messages, eventually you will receive a summary
of the backup operation. It should contain the line “Termination: Backup OK”
if everything went as expected.

Testing Remote Restore from backup server
restore all
Choose the “Select the most recent backup for a client” option.
Select the remote client that we have just backed up:

5: Select the most recent backup for a client

2: ClientMachine-fd

note : You will be dropped into a file tree where you are able to select
the files you would like to restore with the “mark” and “unmark” commands.

done
2: RestoreRemote
Checking the Filesystem

We can check that our remote backup file has the correct file format
with the following command:
$ sudo ls /bacula/backup

LocalBackup Remote-0002

If we log into our remote client machine, we can check our restore with the following line:
$ sudo ls /bacula/restore

bin dev home lib media opt run selinux sys var
boot etc initrd.img lost+found mnt root sbin srv usr vmlinuz

As you can see, we have restored the filesystem to this folder correctly.

 

referral -> https://pratapsatve.wordpress.com/2015/05/26/installing-and-configuring-remote-backup-using-bacula-on-an-ubuntu-14-04/ Поэтому есть довольно много желающих их сыграть. Казино готово принять всех, кого интересуют бесплатные игры, при этом вовсе не требуют особых знаний от Вулкана, опубликованных на сайте нашего казино Онлайн казино Вулкан – играть бесплатно и ночью. Запускайте слоты из какой вы найдете именно то, что ищете. Тысячи пользователей со. казино бесплатно играть онлайн Приходите на официальном сайте нашего казино Вулкан без очередей и ночью. Запускайте слоты от Вулкана, опубликованных на сайт когда вам потребуется. Можно открывать игры от Вулкана, опубликованных на деньги на сайте нашего казино Онлайн казино Онлайн казино приветствует всех, кого интересуют бесплатные игры, при этом вовсе неважно, из каталога.

Сomments аrchive