File::CleanupTask

Alex Balhatchet
Alex BalhatchetCTO at Lokku
File::CleanupTask
CPAN module from Savio Dimatteo (DARKSMO)
Presentation by Alex Balhatchet (KAORU)
A little about me
A little about Lokku/Nestoria




We're hiring! http://lokku.com/jobs
File::CleanupTask
File::CleanupTask
Configuration based file deletion and backup
The Problem




o Lots of logs and junk lying around
o How to delete old files and save disk space?
o How to avoid deleting the wrong things?!
The Solution




o Point it at a directory
o Tell it how old files are allowed to be
o Files go away!
The Solution




o Configuration driven
o Designed to be run via cron
o Super awesome dry-run and verbose modes
Action!



~$ run-file-cleanuptask   
    --conf ops.tasks      
    --taskname snapshot   
    --verbose
Basics



[logs]
path        = /home/...
max_days    = 14
recursive   = 1
Pattern Matching



[searchindexbuild-reports]
max_days           = 7
path               = /home/...
pattern            = /[/]report.+$/
recursive          = 1
Pattern Matching



[releases]
max_days        =   3
path            =   /home/...
do_not_delete   =   /important.txt/
recursive       =   1
Backup instead of delete



[dropbox-backupraw]
path        = /home/...
max_days    = 4
backup_path = /home/.../old/
recursive   = 1
Compress those backups


[dropbox-backupraw]
path        = /home/...
max_days    = 4
recursive   = 1
backup_path = /home/.../old/
backup_gzip = 1
Keeping Tidy



[temp]
max_days                  =   20
path                      =   /home/...
prune_empty_directories   =   1
recursive                 =   1
Keeping Tidy


[releases]
max_days             = 3
path                 = /home/...
delete_all_or_nothing_in
     = /home/...
recursive            = 1
Hey, I'm using that!



[geobuilds]
max_days                =   5
path                    =   /home/...
keep_if_linked_in       =   /home/...
recursive               =   1
CPAN Module

Please try File::CleanupTask out!

https://metacpan.org/module/File::CleanupTask

Forks and pull requests welcome!

https://github.com/darksmo/File-CleanupTask
Questions?
Thanks!
Reminder: we're hiring! http://lokku.com/jobs
1 of 20

Recommended

Huong dan cai dat hadoop by
Huong dan cai dat hadoopHuong dan cai dat hadoop
Huong dan cai dat hadoopQuỳnh Phan
292 views2 slides
Hadoop installation by
Hadoop installationHadoop installation
Hadoop installationhabeebulla g
223 views6 slides
Dc kyiv2010 jun_08 by
Dc kyiv2010 jun_08Dc kyiv2010 jun_08
Dc kyiv2010 jun_08Andrii Podanenko
602 views22 slides
HaskellとDebianの辛くて甘い関係 by
HaskellとDebianの辛くて甘い関係HaskellとDebianの辛くて甘い関係
HaskellとDebianの辛くて甘い関係Kiwamu Okabe
5.4K views50 slides
Tutorial Puppet by
Tutorial PuppetTutorial Puppet
Tutorial PuppetDaniel Sobral
1.2K views15 slides
Using docker for data science - part 2 by
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2Calvin Giles
2.5K views21 slides

More Related Content

What's hot

Memory Management in WordPress by
Memory Management in WordPressMemory Management in WordPress
Memory Management in WordPressKonstantin Kovshenin
1.5K views60 slides
The promise of asynchronous php by
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
1.1K views53 slides
5.managing hdfs by
5.managing hdfs5.managing hdfs
5.managing hdfsdatabloginfo
187 views11 slides
Mac OS X Lion で作る WordPress local 環境 by
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Yuriko IKEDA
4.7K views35 slides
Why Perl, when you can use bash+awk+sed? :P by
Why Perl, when you can use bash+awk+sed? :PWhy Perl, when you can use bash+awk+sed? :P
Why Perl, when you can use bash+awk+sed? :PLuciano Rocha
670 views9 slides
Profiling with Xhprof by
Profiling with XhprofProfiling with Xhprof
Profiling with XhprofTim Massey
2.6K views10 slides

What's hot(17)

The promise of asynchronous php by Wim Godden
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
Wim Godden1.1K views
Mac OS X Lion で作る WordPress local 環境 by Yuriko IKEDA
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境
Yuriko IKEDA4.7K views
Why Perl, when you can use bash+awk+sed? :P by Luciano Rocha
Why Perl, when you can use bash+awk+sed? :PWhy Perl, when you can use bash+awk+sed? :P
Why Perl, when you can use bash+awk+sed? :P
Luciano Rocha670 views
Profiling with Xhprof by Tim Massey
Profiling with XhprofProfiling with Xhprof
Profiling with Xhprof
Tim Massey2.6K views
MongoDB Replication (Dwight Merriman) by MongoSF
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)
MongoSF2.3K views
Configuration surgery with Augeas (OggCamp 12) by Dominic Cleal
Configuration surgery with Augeas (OggCamp 12)Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
Dominic Cleal5.5K views
Multisite Van Dyk Walkah by jvandyk
Multisite Van Dyk WalkahMultisite Van Dyk Walkah
Multisite Van Dyk Walkah
jvandyk1.2K views
Best practices for ansible roles development by jtyr
Best practices for ansible roles developmentBest practices for ansible roles development
Best practices for ansible roles development
jtyr3.2K views
Laporan setting dns by Septian Adi
Laporan setting dnsLaporan setting dns
Laporan setting dns
Septian Adi292 views
Scrip queue tree by Marco Arias
Scrip queue treeScrip queue tree
Scrip queue tree
Marco Arias422 views
Archlinux install by sambismo
Archlinux installArchlinux install
Archlinux install
sambismo1.3K views

Similar to File::CleanupTask

BITS: Introduction to Linux - Text manipulation tools for bioinformatics by
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS
7.8K views85 slides
Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie... by
Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie...Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie...
Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie...NETWAYS
579 views33 slides
Backup, Restore, and Disaster Recovery by
Backup, Restore, and Disaster RecoveryBackup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryMongoDB
1.2K views25 slides
101 3.3 perform basic file management by
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file managementAcácio Oliveira
390 views17 slides
How we setup Rsync-powered Incremental Backups by
How we setup Rsync-powered Incremental BackupsHow we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental Backupsnicholaspaun
5K views41 slides
Counting on God by
Counting on GodCounting on God
Counting on GodJames Gray
876 views39 slides

Similar to File::CleanupTask(20)

BITS: Introduction to Linux - Text manipulation tools for bioinformatics by BITS
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS7.8K views
Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie... by NETWAYS
Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie...Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie...
Open Source Backup Conference 2014: Migration from bacula to bareos, by Danie...
NETWAYS579 views
Backup, Restore, and Disaster Recovery by MongoDB
Backup, Restore, and Disaster RecoveryBackup, Restore, and Disaster Recovery
Backup, Restore, and Disaster Recovery
MongoDB1.2K views
101 3.3 perform basic file management by Acácio Oliveira
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira390 views
How we setup Rsync-powered Incremental Backups by nicholaspaun
How we setup Rsync-powered Incremental BackupsHow we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental Backups
nicholaspaun5K views
Counting on God by James Gray
Counting on GodCounting on God
Counting on God
James Gray876 views
Fun with processes - lightning talk by Paweł Dawczak
Fun with processes - lightning talkFun with processes - lightning talk
Fun with processes - lightning talk
Paweł Dawczak37 views
ASU DUG - SVN and CVS by Jeff Beeman
ASU DUG - SVN and CVSASU DUG - SVN and CVS
ASU DUG - SVN and CVS
Jeff Beeman296 views
Optimizing S3 Write-heavy Spark workloads by datamantra
Optimizing S3 Write-heavy Spark workloadsOptimizing S3 Write-heavy Spark workloads
Optimizing S3 Write-heavy Spark workloads
datamantra7.1K views
Managing ADLS gen2 using Apache Spark by Databricks
Managing ADLS gen2 using Apache SparkManaging ADLS gen2 using Apache Spark
Managing ADLS gen2 using Apache Spark
Databricks501 views
BDM32: AdamCloud Project - Part II by David Lauzon
BDM32: AdamCloud Project - Part IIBDM32: AdamCloud Project - Part II
BDM32: AdamCloud Project - Part II
David Lauzon2.9K views
Course 102: Lecture 3: Basic Concepts And Commands by Ahmed El-Arabawy
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
Ahmed El-Arabawy901 views
Docker Demo @ IuK Seminar by Martin Scharm
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
Martin Scharm3.7K views
Workshop eZ Publish Caching Mechanisms by Kaliop-slide
Workshop eZ Publish Caching MechanismsWorkshop eZ Publish Caching Mechanisms
Workshop eZ Publish Caching Mechanisms
Kaliop-slide6.6K views
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &... by NETWAYS
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
NETWAYS119 views
10 Problems with your RMAN backup script by Yury Velikanov
10 Problems with your RMAN backup script10 Problems with your RMAN backup script
10 Problems with your RMAN backup script
Yury Velikanov21.2K views
Install Archlinux in 10 Steps (Sort of) :) by Sian Lerk Lau
Install Archlinux in 10 Steps (Sort of) :)Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)
Sian Lerk Lau1.3K views

More from Alex Balhatchet

Geocoding the World in Perl YAPC::EU 2014 by
Geocoding the World in Perl YAPC::EU 2014Geocoding the World in Perl YAPC::EU 2014
Geocoding the World in Perl YAPC::EU 2014Alex Balhatchet
1.4K views33 slides
Test Kit 2.0 YAPC::EU 2014 Lightning Talk by
Test Kit 2.0 YAPC::EU 2014 Lightning TalkTest Kit 2.0 YAPC::EU 2014 Lightning Talk
Test Kit 2.0 YAPC::EU 2014 Lightning TalkAlex Balhatchet
930 views22 slides
Nestoria Dev Blog YAPC::EU 2014 Lightning Talk by
Nestoria Dev Blog YAPC::EU 2014 Lightning TalkNestoria Dev Blog YAPC::EU 2014 Lightning Talk
Nestoria Dev Blog YAPC::EU 2014 Lightning TalkAlex Balhatchet
1.1K views15 slides
Test::Kit 2.0 (London.pm Technical Meeting July 2014) by
Test::Kit 2.0 (London.pm Technical Meeting July 2014)Test::Kit 2.0 (London.pm Technical Meeting July 2014)
Test::Kit 2.0 (London.pm Technical Meeting July 2014)Alex Balhatchet
1.2K views32 slides
Perl 101 by
Perl 101Perl 101
Perl 101Alex Balhatchet
2.8K views51 slides
App::highlight - a simple grep-like highlighter app by
App::highlight - a simple grep-like highlighter appApp::highlight - a simple grep-like highlighter app
App::highlight - a simple grep-like highlighter appAlex Balhatchet
15.7K views28 slides

More from Alex Balhatchet(10)

Geocoding the World in Perl YAPC::EU 2014 by Alex Balhatchet
Geocoding the World in Perl YAPC::EU 2014Geocoding the World in Perl YAPC::EU 2014
Geocoding the World in Perl YAPC::EU 2014
Alex Balhatchet1.4K views
Test Kit 2.0 YAPC::EU 2014 Lightning Talk by Alex Balhatchet
Test Kit 2.0 YAPC::EU 2014 Lightning TalkTest Kit 2.0 YAPC::EU 2014 Lightning Talk
Test Kit 2.0 YAPC::EU 2014 Lightning Talk
Alex Balhatchet930 views
Nestoria Dev Blog YAPC::EU 2014 Lightning Talk by Alex Balhatchet
Nestoria Dev Blog YAPC::EU 2014 Lightning TalkNestoria Dev Blog YAPC::EU 2014 Lightning Talk
Nestoria Dev Blog YAPC::EU 2014 Lightning Talk
Alex Balhatchet1.1K views
Test::Kit 2.0 (London.pm Technical Meeting July 2014) by Alex Balhatchet
Test::Kit 2.0 (London.pm Technical Meeting July 2014)Test::Kit 2.0 (London.pm Technical Meeting July 2014)
Test::Kit 2.0 (London.pm Technical Meeting July 2014)
Alex Balhatchet1.2K views
App::highlight - a simple grep-like highlighter app by Alex Balhatchet
App::highlight - a simple grep-like highlighter appApp::highlight - a simple grep-like highlighter app
App::highlight - a simple grep-like highlighter app
Alex Balhatchet15.7K views
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe... by Alex Balhatchet
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Alex Balhatchet2.5K views
Introduction to Writing Readable and Maintainable Perl (YAPC::EU 2011 Version) by Alex Balhatchet
Introduction to Writing Readable and Maintainable Perl (YAPC::EU 2011 Version)Introduction to Writing Readable and Maintainable Perl (YAPC::EU 2011 Version)
Introduction to Writing Readable and Maintainable Perl (YAPC::EU 2011 Version)
Alex Balhatchet1.2K views
Introduction to writing readable and maintainable Perl by Alex Balhatchet
Introduction to writing readable and maintainable PerlIntroduction to writing readable and maintainable Perl
Introduction to writing readable and maintainable Perl
Alex Balhatchet4.5K views

Recently uploaded

The Role of Patterns in the Era of Large Language Models by
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language ModelsYunyao Li
80 views65 slides
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
385 views86 slides
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...ShapeBlue
138 views18 slides
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueShapeBlue
93 views15 slides
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc
160 views29 slides
State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
253 views53 slides

Recently uploaded(20)

The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li80 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software385 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue138 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue93 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc160 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue253 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue154 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue158 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson156 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays53 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue101 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue79 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash153 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue117 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue120 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue163 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue by ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue103 views

File::CleanupTask