Search This Blog

Monday, October 4, 2010

Tarsnap cleanup on FreeBSD

The simple script to preform tarsnap cleanup on FreeBSD:


#!/bin/sh

keyfile="/path/to/rw_keyfile"

# man(1) date will help (keep files for last 7 days in this example)
# we prefer to keep files in this format 2009-10-18+06:15-database as mentioned in earlier post
rd=`date -v-7d -v0H -v0M -v0S`
pd=`date -j -f "%a %b %d %T %Z %Y" "$rd" "+%s"`

for file in `tarsnap --keyfile $keyfile --list-archives | sort`; do
fd=`echo -n $file | cut -d'+' -f 1`
fd=`date -j -f "%Y-%m-%d %T" "$fd 00:00:00" "+%s"`
if [ $fd -lt $pd ]; then
echo Deleting the $file archive
tarsnap --keyfile $keyfile -d -f $file
fi
done

32 comments:

Guo Guo said...

caihuanglin20150304
ray ban glasses
canada goose jacket
ray bans
burberry outlet
canada goose
hollister co
michael kors outlet online
jordan 3
hollister clothing store
michael kors outlet online sale
coach outlet
ralph lauren
mont blanc legend
toms wedges
red timberland boots
tory burch outlet
gucci belts
ugg boots
ugg boots
jordan 11 columbia
abercrombie & fitch new york
louis vuitton handbags
coach outlet store online
polo outlet
canada goose sale
coach outlet
christian louboutin outlet
ugg outlet
michael kors outlet online
abercrombie kids

chenlina said...

chenlina20150611
oakley sunglasses
hollister clothing
jordan 5
abercrombie and fitch
coach outlet store online
gucci bags
www.louisvuitton.com
michael kors handbags
mont blanc pens
louis vuitton handbags
louis vuitton handbags
hollister kids
michael kors
discount oakley sunglasses
ray ban sungalsses
louis vuitton
louis vuitton outlet
chanel handbags
timberlands
jordan 6 rings
ray ban sunglasses
ray ban outlet
michael kors
coach outlet online
hermes birkin
kevin durant basketball shoes
michael kors outlet online
oakley sunglasses sale
coach factory outlet
kate spade
ray ban outlet
louis vuitton outlet
replica rolex watches
michael kors
gucci handbags
insanity workout
chanel handbags
christian louboutin outlet
hogan outlet
abercrombie store

Da Shuai Guo said...

guowenhao0803
air jordan 4
swarovski crystal
ray ban sunglasses
air max 2014
oakley sunglasses
celine outlet
coach outlet online
barcelona jersey
ray ban sunglasses
new orleans saints jerseys
pandora
louis vuitton outlet
babyliss
cartier love bracelet
coach factory outlet
kobe shoes
coach outlet
vibram fivefingers
nike outlet store
lacoste polo shirts
insanity workout
links of london uk
converse all star
prada shoes
arizona cardinals jerseys
ray ban sunglasses
oakley sunglasses
louis vuitton handbags
instyler ionic styler
juicy couture outlet
cheap mlb jerseys
rolex watches
tory burch outlet
true religion jeans, http://www.truereligionoutletstore.us.com
stuart weitzman boots
cheap football shirts
miami heat jersey
burberry outlet online, http://www.burberryoutletonlinestore.com.co
hollister clothing
nike air max uk

风骚达哥 said...

20150922 junda
abercrombie
Hollister uk
Air Jordan 3 III Retro Free Shipping
louis vuitton
coach outlet
Cheap Jordans For Sale Wholesale
canada goose jackets
Christian Louis Vuitton Red Bottoms
New Louis Vuitton Handbags Outlet
Official Coach Factory Outlet Online Sale
Jordan 13 Shoes For Sale
canada goose outlet
Real Louis Vuitton Bags
nike trainers
Jordan 8 Bugs Bunny
Authentic Louis Vuitton Belts Outlet Store
burberry outlet
Louis Vuitton Bags On Sale
true religion jeans
canada goose outlet online
Lebron James Basketball Shoes Sale
Louis Vuitton Handbags Discount Off
nfl jerseys
Abercrombie T-Shirts
Discount Ray Ban Polarized Sunglasses
coach factory outlet online
Louis Vuitton Outlet USA
celine
Louis Vuitton Luxury Official Website
michael kors outlet

风骚达哥 said...

20150922 junda
abercrombie
Hollister uk
Air Jordan 3 III Retro Free Shipping
louis vuitton
coach outlet
Cheap Jordans For Sale Wholesale
canada goose jackets
Christian Louis Vuitton Red Bottoms
New Louis Vuitton Handbags Outlet
Official Coach Factory Outlet Online Sale
Jordan 13 Shoes For Sale
canada goose outlet
Real Louis Vuitton Bags
nike trainers
Jordan 8 Bugs Bunny
Authentic Louis Vuitton Belts Outlet Store
burberry outlet
Louis Vuitton Bags On Sale
true religion jeans
canada goose outlet online
Lebron James Basketball Shoes Sale
Louis Vuitton Handbags Discount Off
nfl jerseys
Abercrombie T-Shirts
Discount Ray Ban Polarized Sunglasses
coach factory outlet online
Louis Vuitton Outlet USA
celine
Louis Vuitton Luxury Official Website
michael kors outlet

Minko Chen said...

michael kors uk
basketball shoes,basketball sneakers,lebron james shoes,sports shoes,kobe bryant shoes,kobe sneakers,nike basketball shoes,running shoes,mens sport shoes,nike shoes
ferragamo outlet
dallas cowboys
michael kors uk
louis vuitton outlet store
coach outlet online
nike free
hogan,hogan outlet,scarpe hogan,hogan sito ufficiale,hogan interactive
toms outlet
oakley sunglasses wholesale
celine outlet
tory burch outlet online
ugg boots clearance,ugg australia,uggs on sale,ugg slippers,uggs boots,uggs outlet,ugg boots,ugg,uggs
links of london jewellery
chicago bulls
hollister uk
nike outlet store
new york jets
oklahoma city thunder
the north face outlet
1026MINKO

chenlili said...

2016-4-21 xiaobao
ghd hair straighteners
louis vuitton bags
louis vuitton
nike trainers
tory burch sale
michael kors handbags
nike sb shoes
oakley sunglasses wholesale
christian louboutin
celine handbags
mont blanc pens
hollister uk
hollister clothing
air jordans
michael kors outlet
north face outlet
nfl jerseys
cheap jordans
louis vuitton outlet stores
nike basketball shoes
louis vuitton outlet
kate spade handbags
coach outlet
kate spade handbags
nike sb
tory burch outlet
michael kors outlet
oakley sunglasses
adidas shoes
louis vuitton outlet
lebron james shoes
fitflops
michael kors outlet
oakley sunglasses
ralph lauren polo
louis vuitton outlet
replica watches
caoch outlet
michael kors outlet online
adidas superstar

chenlili said...

2016-4-21 xiaobao
longchamp handbags
christian louboutin outlet
cheap jordan shoes
louis vuitton handbags
coach outlet online
air jordan retro
polo ralph lauren
toms shoes
oakley outlet
adidas uk
michael kors outlet clearance
jordans
fitflop sandals
coach outlet
ray ban sunglasses
michael kors handbags
coach factorty outlet
nike outlet store
tory burch outlet
nike outlet store
ray ban
adidas originals
ugg boots
ray ban wayfarer
ray ban sunglasses
polo ralph lauren
oakley vault
coach factory outlet
christian louboutin outlet
louis vuitton handbags
michael kors outlet online
jordan 8s
michael kors outlet
coach factory outlet
adidas originals shoes
ray ban sunglasses
jordan 13
true religion outlet
air jordans
vans shoes

John said...

oakley vault sunglasses
omega watches
adidas nmd
ecco shoes
prada outlet
tiffany jewelry outlet
hollister clothing store
nike roshe run women
mont blanc pens outlet
kate spade bags
cheap ray ban sunglasses
coach outlet online
coach outlet online
gucci handbags outlet
rolex replica watches
omega seamaster
coach factory outlet
reebok uk
michael kors outlet clearance
armani jeans
nike air max
ray ban sunglasses
polo ralph lauren outlet
the north face outlet
yeezy boost 350 black
adidas gazelle
louis vuitton bags
cheap ray bans
bottega veneta handbags
north face outlet
adidas shoes uk
adidas trainers
coach factory outlet
201678yuanyuan

Gege Dai said...

oakley sunglasses
tiffany jewelry
foamposite shoes
louis vuitton bags cheap
coach outlet online
michael kors outlet
timberland shoes
nike blazer pas cher
polo ralph lauren
ugg outlet
cheap snapbacks
louboutin pas cher
mulberry uk
prada sunglasses for women
cheap uggs
michael kors outlet
swarovski outlet
burberry outlet
ugg boots
air max 90
cartier uk
michael kors outlet online
mulberry handbags
michael kors outlet
coach outlet store
mbt shoes
oakley sunglasses
valentino outlet
fitflops outlet
uggs on sale
true religion jeans
nike outlet store
louis vuitton handbags
oakley sunglasses wholesale
ferragamo shoes
czq20160726

dong dong23 said...

coach outlet online
tiffany outlet
christian louboutin flats
nike roshe flyknit
cheap oakley sunglasses
michael kors handbags
christian louboutin outlet
adidas outlet
cheap jordans
coach outlet store online clearances
jordan 11s
louis vuitton outlet
oakley sunglasses wholesale
coach factory outlet
louis vuitton
coach outlet store online
michael kors outlet
michael kors
beats headphones
coach factory outlet
celine
jordan 8
jordan retro 3
north face outlet
coach factory outlet
air jordan retro
rolex watches outlet
lebron james shoes 12
coach outlet
ray ban sunglasses outlet
louis vuitton handbags
asics shoes
ray ban sunglasses
adidas originals
michael kors handbags
burberry outlet
tory burch flats
michael kors outlet clearance
giuseppe zanotti
mont blanc pens
20168.1wengdongdong

dong dong23 said...

ugg boots paris
coach canada
timberland outlet
tommy hilfiger outlet
christian louboutin outlet
gucci outlet
louis vuitton
cheap ray ban sunglasses
ghd flat iron
louis vuitton outlet
201610.17wengdongdong

chenmeinv0 said...

retro jordan 13
ray ban outlet
coach outlet store online clearances
seahawks jerseys
michael kors outlet clearance
air max 90
true religion outlet
cheap jordan shoes
ugg outlet
jordan shoes
20172.6chenjinyan

raybanoutlet001 said...

ray bans
nike air force 1
yeezy boost 350 black
pittsburgh steelers jersey
chaussure louboutin pas cher
hollister
polo ralph lauren
dolce and gabbana
converse shoes

raybanoutlet001 said...

nike blazer pas cher
replica watches
buffalo bills jerseys
oakley sunglasses
ralph lauren pas cher
cheap mlb jerseys
cheap nba jerseys
atlanta falcons jersey
oklahoma city thunder jerseys
coach factory outlet

raybanoutlet001 said...

nike blazer pas cher
replica watches
buffalo bills jerseys
oakley sunglasses
ralph lauren pas cher
cheap mlb jerseys
cheap nba jerseys
atlanta falcons jersey
oklahoma city thunder jerseys
coach factory outlet

shengda xu said...

pandora charms outlet
giants jerseys
oakley sunglasses outlet
red bottom
louis vuitton outlet online
mulberry bags
oakley sunglasses outlet
burberry outlet online
michael kors outlet online
purs jerseys
xushengda0528

shengda xu said...

polo ralph lauren outlet online
adidas superstars
louboutin outlet
jordan shoes
ralph lauren uk
oakley sunglasses on sale
pandora charms outlet
adidas running shoes
polo ralph lauren outlet online
kate spade purses
xushengda0528

kkk said...

mbt
ralph lauren sale
fitflops
polo ralph lauren
adidas yeezy boost
mont blanc pens
adidas yeezy boost
true religion
yeezy shoes
coach outlet store online
170626yueqin

aaa kitty20101122 said...

longchamp handbags
longchamp bags
longchamp bags
longchamp
longchamp le pliage
longchamp handbags
longchamp outlet
reebok outlet
reebok shoes
jordan shoes

raybanoutlet001 said...

valentino sneakers
cleveland browns jerseys
fitflop shoes
cheap ray ban sunglasses
cheap uggs
air jordan shoes
valentino sneakers
michael kors bags
nike roshe one
ralph lauren polo

ben daigege said...

nike store
valentino outlet
michael kors outlet
coach outlet
michael kors outlet
ugg black friday
michael kors outlet
hermes birkin
puma outlet
michael kors outlet clearance
chanyuan2017.11.14

fangyaoting said...

20180118 junda
kate spade outlet online store
oakley sunglasses uk
canada goose outlet
polo outlet
uggs on sale
longchamp outlet online
fitflops
michael kors outlet
oakley sunglasses
uggs outlet

chenlili said...

the north face
air jordan 14
michael kors outlet
moncler outlet
burberry outlet
dolce and gabbana
ray ban sunglasses
nike blazer
jordan xx9
superdry clothing
20183.9chenjinyan

ninest123 said...

ralph lauren outlet
canada goose jackets
cheap oakley sunglasses
adidas shoes
air max 90
kate spade outlet
louis vuitton outlet
jordan shoes
cheap oakley sunglasses
ralph lauren outlet
mt0420

5689 said...

zzzzz2018.7.30
cheap snapbacks
skechers outlet
mlb jerseys
coach outlet online
polo ralph lauren
pandora jewelry
ferragamo shoes
coach factory outlet
true religion outlet
ralph lauren outlet

Bilibili said...

Air Jordan 4
Retro Jordan 11
Pandora Jewelry Official Site
Nike Air Max 270
Pandora
Air Jordan 9
Jordan 11
Kyrie Irving Shoes
Pandora Outlet
Adidas Yeezy
Rodney20190308

Coqicoqi said...

Jordans 11
Red Bottom Shoes
Pandora Jewelry Official Site
Pandora Charms Outlet
Adidas Yeezy
Pandora Jewelry
Air Jordan 9
Air Jordan 11
Retro Jordan 11
Ryan20190309

Coqicoqi said...

Jordan 11
Pandora
Pandora
Jordan 9
Pandora Outlet
Yeezy boost 350 v2
Pandora Jewelry Official Site
Jordan Retro
Kyrie Shoes
Ryan20190323

Coqicoqi said...

Pandora Jewelry
Air Jordan Retro 9
Yeezy boost
Air Jordan 4
Kyrie Shoes
Jordan 11 For Sale
Pandora Jewelry Outlet
Air Jordan 11
Jordan 9
Jordans 11
Ryan20190405

Hualala said...

Jordan 9
Air Jordan
Nike Air Max 270
Kyrie Shoes
Air Jordan 9
Pandora Charms Outlet
Jordan 4 Retro
Pandora Jewelry
Red Bottom Shoes For Women
Yeezy boost 350 v2
Paul20190416

yanmaneee said...

balenciaga shoes
supreme hoodie
kyrie 5 shoes
calvin klein outlet
adidas stan smith
michael kors handbags
curry 6
adidas nmd
yeezy shoes
nike epic react