Closed
Bug 1369335
Opened 7 years ago
Closed 7 years ago
Bacula - Remove /var/lib/pgsql/db-backup/* on rhnsat1.dmz.scl3 after backup
Categories
(Infrastructure & Operations :: Infrastructure: Backups, task)
Infrastructure & Operations
Infrastructure: Backups
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Usul, Assigned: rtucker)
Details
Attachments
(1 file)
1.13 KB,
patch
|
ashish
:
review+
|
Details | Diff | Splinter Review |
Thu 10:35:55 UTC [5039] [moc] rhnsat1.dmz.scl3.mozilla.com:Disk - All is WARNING: DISK WARNING - free space: / 3479 MB (10% inode=94%): (http://m.mozilla.org/Disk+-+All) This alerted after I patched and backedup the db, backups are 2,1 GB heavy. [root@rhnsat1.dmz.scl3 db-backups]# ls -lhtr total 4,1G -rw-r--r-- 1 postgres root 2,0G 27 avril 01:27 042717 -rw-r--r-- 1 postgres root 2,1G 1 juin 10:26 backup010617 Maybe we should clean this path on a monthly basis ? fixed the alarm by removing the older backup
Comment 1•7 years ago
|
||
Sure
Assignee: nobody → rchilds
Severity: normal → enhancement
Status: NEW → ASSIGNED
Comment 2•7 years ago
|
||
Here's a cron to delete everything in the backup directory at the beginning of each month.
Attachment #8877015 -
Flags: review?(ashish)
Updated•7 years ago
|
Summary: cron a job to clean up the /root/backup directory → cron a job to clean up /root/backup on rhnsat1.dmz.scl3
Comment 3•7 years ago
|
||
Comment on attachment 8877015 [details] [diff] [review] satellite-cron1 r+ but what is this backup? Does this go into bacula? If so, bacula-client can rm files after the backup job completes...
Attachment #8877015 -
Flags: review?(ashish) → review+
Comment 4•7 years ago
|
||
(In reply to Ashish Vijayaram [:ashish] from comment #3) > Comment on attachment 8877015 [details] [diff] [review] > satellite-cron1 > > r+ but what is this backup? Does this go into bacula? If so, bacula-client > can rm files after the backup job completes... This is a backup of the postgres db that the satellite relies upon. It would be nice if Bacula could do this.
Comment 5•7 years ago
|
||
Adding :rtucker - can we have bacula-client remove /root/backup/* on rhnsat1.dmz.scl3 after it finishes the backup?
Comment 6•7 years ago
|
||
Tossing to that component to wrap up -- Thanks
Assignee: rchilds → infra
Status: ASSIGNED → NEW
Component: MOC: Problems → Infrastructure: Backups
QA Contact: lypulong → rtucker
Summary: cron a job to clean up /root/backup on rhnsat1.dmz.scl3 → Bacula - Remove /root/backup/* on rhnsat1.dmz.scl3 after backup
Assignee | ||
Comment 7•7 years ago
|
||
I just checked and there is no /root/backup/ on rhnsat1.dmz.scl3 Is there a different directory to remove?
Comment 8•7 years ago
|
||
(In reply to Rob Tucker [:rtucker] from comment #7) > I just checked and there is no /root/backup/ on rhnsat1.dmz.scl3 > > Is there a different directory to remove? [rchilds@rhnsat1.dmz.scl3 ~]$ sudo ls -alh /var/lib/pgsql/db-backup total 2.1G drwxr-xr-x 2 postgres postgres 4.0K Aug 15 00:06 . drwx------ 3 postgres postgres 4.0K May 22 14:48 .. -rw-r--r-- 1 postgres root 2.1G Aug 15 00:26 081417-1
Assignee | ||
Comment 9•7 years ago
|
||
(In reply to Ryan C [:ryanc] from comment #8) > (In reply to Rob Tucker [:rtucker] from comment #7) > > I just checked and there is no /root/backup/ on rhnsat1.dmz.scl3 > > > > Is there a different directory to remove? > > [rchilds@rhnsat1.dmz.scl3 ~]$ sudo ls -alh /var/lib/pgsql/db-backup > total 2.1G > drwxr-xr-x 2 postgres postgres 4.0K Aug 15 00:06 . > drwx------ 3 postgres postgres 4.0K May 22 14:48 .. > -rw-r--r-- 1 postgres root 2.1G Aug 15 00:26 081417-1 Are you saying to rm -rf /var/lib/pgsql/db-backup/* even though nothing has been written there since August 15?
Comment 10•7 years ago
|
||
Rob, We manually patch this system and when we do, we create a backup during that time. I think the goal here is for bacula to retrieve whatever backup file exists at the time and delete it from the local disk. Thanks
Assignee | ||
Comment 11•7 years ago
|
||
(In reply to Ryan C [:ryanc] from comment #10) > Rob, > > We manually patch this system and when we do, we create a backup during that > time. I think the goal here is for bacula to retrieve whatever backup file > exists at the time and delete it from the local disk. Thanks So to remove all levels of ambiguity: This bug should be "Bacula - Remove /var/lib/pgsql/db-backup/* on rhnsat1.dmz.scl3 after backup" We're currently backing up all of /var. The files backed up from /var/lib/pgsql/db-backup/* will persist for 180 days in bacula once the file has been removed from local disk on rhnsat1.dmz.scl3.mozilla.com.
Assignee | ||
Comment 12•7 years ago
|
||
I've added the following Runscript to the backup job for rhnsat1.dmz.scl3.mozilla.com: Runscript { Command = "/bin/find /var/lib/pgsql/db-backup -type f -exec rm {} \;" RunsOnClient = yes RunsWhen = After } I've ran the job manually and confirmed the removal of /var/lib/pgsql/db-backup/081417-1 The file can be found when backed up by job 239044 If there is anything else to be done here, please comment and reopen.
Assignee: infra → rtucker
Summary: Bacula - Remove /root/backup/* on rhnsat1.dmz.scl3 after backup → Bacula - Remove /var/lib/pgsql/db-backup/* on rhnsat1.dmz.scl3 after backup
Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•