LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 07-05-2011, 09:32 PM   #1
larold
Member
 
Registered: Jan 2010
Posts: 42

Rep: Reputation: 15
New to bacula - emergency situation.


I have been asked to support a Linux environment running Bacula on an emergency basis. Bacula version is 3.0.1. I only have access to bconsole - no guis. I am also completely brand new to Bacula as of a couple of hours ago. I have no physical access to this server.

Basically, I need to determine how to massively reduce the Bacula disk footprint (physical space the disk-based volume files are using) without adding more data to disk.

This client has a Bacula server with 1.3+ TB of internal disk. It is completely full. I used a 'tune2fs -m 1' to give me back some of the reserved space for actual use and "breathing room". All Bacula data is written to a group of 70 files, each roughly 10 GB a piece. Reducing this footprint would help reduce the filesystem from being 100% full.

There are 23 backup clients. I have set the File Retention on all jobs down to 21 days. (Was 60 days). I have set the Job Retention on all jobs down to 2 months (was 6 months.)

I would like to know, using bconsole commands only, the correct steps that will result in fewer physical volume files (hence reduced disk usage) without corrupting any of the data in place. I have a hunch it is some combination of prune commands, followed by purges? I just don't know, and want to proceed safely.

All advice much appreciated.

Please, no:
- Criticizing of the setup - it wasn't mine
- Suggestions that require anything complex outside of bconsole
- Vague descriptions that don't point me to specific steps
- Steps which require more than a couple GB of free disk space

Thanks!!
 
Old 07-06-2011, 11:40 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'm going to offer something that's not a "vague description", but rather a reality check.

In an emergency situation like this, it's crucial to avoid causing a second harmful event (which is normally more damaging than the initial problem).

That said, there is a methodical approach for getting on track:
  1. Set up an impromptu test system with the same Bacula version installed
  2. Read the documentation on Bacula Console commands, and experiment in your test environment to confirm they do what you'd expect
  3. Document the precise steps needed (and how you arrived at that conclusion), inform the customer you're proceeding (and the potential risks involved), and then do it in production.

This reduces your own risks, and makes a favorable outcome much, much more likely. It also provides a trail showing you did your due diligence if you manage to muck things up in spite of it all.

Anything short of that careful approach - including following specific technical advice from a stranger on a forum - and you're really sticking your neck out.
 
1 members found this post helpful.
Old 07-06-2011, 11:49 AM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'd add:

If you're not able to figure out the required steps by reading the Bacula Console documentation, try pinging their user mailing list. But the same rule applies - test any information you receive carefully before doing it in production.

And give the customers a realistic idea about timeline. My guess is they would prefer to have a system that is working correctly in a day or two over a system that is completely borked in twenty minutes.
 
Old 07-06-2011, 12:27 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Yes -- "make haste slowly". Data is irreplaceable and when things go wrong they can go wrong in the worst of all possible ways. How about getting another HDD, preferably larger than the 1.5 TB which does not seem big enough for the backup needs, and copy all the files across plus everything under the Bacula install directory (recommended /opt/bacula) while the Bacula daemons are not running so you can get back to where you are now if anything goes wrong.

The usual gotcha in this situation is that purging and truncating does not truncate the volume files on disk. For that you need the action=truncate option of the purge command.
 
Old 07-06-2011, 08:53 PM   #5
larold
Member
 
Registered: Jan 2010
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by anomie View Post
I'm going to offer something that's not a "vague description", but rather a reality check.

In an emergency situation like this, it's crucial to avoid causing a second harmful event (which is normally more damaging than the initial problem).

That said, there is a methodical approach for getting on track:
  1. Set up an impromptu test system with the same Bacula version installed
  2. Read the documentation on Bacula Console commands, and experiment in your test environment to confirm they do what you'd expect
  3. Document the precise steps needed (and how you arrived at that conclusion), inform the customer you're proceeding (and the potential risks involved), and then do it in production.

This reduces your own risks, and makes a favorable outcome much, much more likely. It also provides a trail showing you did your due diligence if you manage to muck things up in spite of it all.

Anything short of that careful approach - including following specific technical advice from a stranger on a forum - and you're really sticking your neck out.
Fantastic advice - I appreciate it. I can tell you've got some wisdom under your belt. Before I saw your post I actually did exactly what you suggested and all worked out well.

What I ended up doing was pruning files, then jobs, then each volume, applying the new retention policy I had set. Turns out, after specific volume prunes, it told me it was marking the volume as purged. For about 20 of these volumes, I deleted the volume within bconsole, and then physically removed it from disk.

This freed up the space we needed, and should still leave plenty of physical media to hold 21 days worth of backups.

Thanks again for the advice.

[EDIT]: Apparently the action= directive doesn't work or apply in 3.0.1 - bug?

Last edited by larold; 07-06-2011 at 08:58 PM.
 
Old 07-06-2011, 08:57 PM   #6
larold
Member
 
Registered: Jan 2010
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by catkin View Post
Yes -- "make haste slowly". Data is irreplaceable and when things go wrong they can go wrong in the worst of all possible ways. How about getting another HDD, preferably larger than the 1.5 TB which does not seem big enough for the backup needs, and copy all the files across plus everything under the Bacula install directory (recommended /opt/bacula) while the Bacula daemons are not running so you can get back to where you are now if anything goes wrong.

The usual gotcha in this situation is that purging and truncating does not truncate the volume files on disk. For that you need the action=truncate option of the purge command.
Normally I'd agree with this but I didn't have physical access to the server and the customer advised me they'd prefer a riskier "more aggresive" approach than carefully waiting 1-2 days to go through the due diligence of preserving the backup environment. (!!! I was surprised too!)

In the end I quintuple-checked everything I was getting from the Bacula documentation along with the modest amount (2-3) of helpful links I could find on the Inter-webs.

Thanks again to everyone for their advice in this thread - very wise indeed.
 
Old 07-06-2011, 11:59 PM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by larold View Post
[EDIT]: Apparently the action= directive doesn't work or apply in 3.0.1 - bug?
Sorry -- it was not introduced until a later version.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup using bacula rosv Linux - Server 13 10-29-2011 08:51 AM
Bacula on RHEL vishesh Linux - Server 2 12-07-2009 09:59 PM
bacula on redhat bulldozers Linux - Software 5 10-27-2009 10:25 AM
Bacula bug???? tqz Linux - Newbie 1 08-07-2009 07:59 AM
Bacula TLS how-to? yanik Linux - Software 1 10-06-2006 02:13 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration