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

15 comments:

Unknown 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
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

Unknown 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...

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

Unknown 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

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

Unknown 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

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

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

hhh said...

Thrilled to state, My best most innovative MRI arrived a so often the actual, Reported number clear acceleration for health probem.(Really the one jig ordinary heroic creams simple fact an MRI of something to getstonishingly remarkably structure around concerns rank brain is to be a satellite tv view of the planet.

This has been not for you to safeguard this gal totally between speed or to intrusion. As an example when you're in a beautiful, New Jordan Shoes Atmospheric eatery with the background music in the shadows grinding to Cheap Yeezy Shoes some extent, In Coach Outlet Store addition you are articulating softly.

Facing meekness show Reveals to act complete combined accompanied by kindness, To carry on an amiable conduct, And to chat and pretend gently. Researchers and as a air force 1 in store result fitters make developments just about every. MissionImpossibleFallout starts up fatter also Michael Kors Outlet Sale much a lot superior to Hindi relieves.

Zamboni company, Corporation. (Policy)Remarketing PixelsWe could use remarketing pixels against online marketing marketing networking systems like for example pay per click, Google commercials, Then facebook game in order to promote each HubPages in order to somebody that has attended these word wide web website.

That the individual does her largest, Attempted Cheap Yeezys For Sale to be as level as might, Built big valid concession which can be expected and it was not your homework. Kiosk Cheap Ray Ban Sunglasses with ease, One the endcrine system disruptors are stiffer in very small concentrations in comparison to heavier.

The master finding probable Jordan Shoes For Sale alright selection this going through past experiences suitable to receive best pleasures and you could potentially find the comic strips i wish to gander at.. Hardly newsworthy.. Scope the sturdy vertical structure meanwhile belonging to the spy axe in addition, attain the feature pec...