I want to create a script which deleted files in the following folders older than 30 days. There are a particular version of files inside it to be deleted
i have a script, which is continuously looping. i want to view the script name when i use ps command... it is only showing -sh ...
UID PID PPID C STIME TTY TIME COMMAND
informix 8533 20923 0 18:19:28 pts/ta 0:00 -sh
but i dont have my scriptname displayed .... how can i do that my script is... (0 Replies)
Ok I admit it I am stumped and I would appreciate any and all help
Here is what I am trying to do.
Korn Shell script
I am setting a variable to another shell script that I want to invoke in my main script like so:
GETDIR=/vol100/cfg/.getdir
The .getdir shell script take a parameter,... (4 Replies)
Hi
I am using DB2 as the database and i am reading syscat.columns from the database.
I want to manipulate the rows returned by running SQL query from the shell script. The manipulation involves addition and deletion of the rows from the resultset.
All the above i want to do using SQL... (5 Replies)
hi i want solution regarding usage of array. i m having code which is written using if-
elif and can i use or access using arrays.
here i wana use array values along with if -elif condition. i dnt wana use command line argument
parameter1=(scram no_scram)
if ; then
... (0 Replies)
Hi, Please accept my apologies if I have not explained anything clearly enough but i am a little old on new lingo!!!
I am running XP from home and last night the following happened.
After being logged on for pretty much the full day, I had what seemed like a pop up come up. Although most pop... (3 Replies)
--------------------------------------------------------------------------------
hy guys,
i got few interview questions i need someone to answer urgently:
1)If you cant get to the root, you try to fsck it, but gets errors to read file systems. What steps do you take to recover the host... (1 Reply)
Hi,
Below is my issue which I desperately need and I want a shell script which can do this job.
I need this script as I m planning to put this for a system health check. Please assist me.
1. There are 10 log files in a particular location.
2. open each log file. Goto to the end of the... (1 Reply)
Hello Friends,
I am a Graduate in Computers. I completed BCA degree this year. I want to make my career in UNIX. But, unfortunately I don't know anybody who can guide me. I am totally confuse because I don't know where to start and what are the future prospect in UNIX.
Please give your... (4 Replies)
Hi,
I have a directory, where i get 4 files for each day... The files will be generated at any time. I am trying for a shell script for copying the file from this directory whenever new file is generated.
Say for example : If the directory X has following files A1,A2,A3,A4,B1,B2,B3,B4...... (2 Replies)
KING KONG ELECTRICITY AUTHORITY
BILL CALCULATOR
You are required to develop a script that will enable KING KONG ELECTRICITY AUTHORITY to
calculate customer bills based on their meter readings.
The customers are categorized into the following categories:
Residential customers
Commercial... (1 Reply)
Discussion started by: watisevil
1 Replies
LEARN ABOUT DEBIAN
expire_backups
EXPIRE_BACKUPS(1) S3QL EXPIRE_BACKUPS(1)NAME
expire_backups - Intelligently expire old backups
SYNOPSIS
expire_backups [options] <age> [<age> ...]
DESCRIPTION
The expire_backups command intelligently remove old backups that are no longer needed.
To define what backups you want to keep for how long, you define a number of age ranges. expire_backups ensures that you will have at least
one backup in each age range at all times. It will keep exactly as many backups as are required for that and delete any backups that become
redundant.
Age ranges are specified by giving a list of range boundaries in terms of backup cycles. Every time you create a new backup, the existing
backups age by one cycle.
Example: when expire_backups is called with the age range definition 1 3 7 14 31, it will guarantee that you always have the following
backups available:
1. A backup that is 0 to 1 cycles old (i.e, the most recent backup)
2. A backup that is 1 to 3 cycles old
3. A backup that is 3 to 7 cycles old
4. A backup that is 7 to 14 cycles old
5. A backup that is 14 to 31 cycles old
Note If you do backups in fixed intervals, then one cycle will be equivalent to the backup interval. The advantage of specifying the age
ranges in terms of backup cycles rather than days or weeks is that it allows you to gracefully handle irregular backup intervals.
Imagine that for some reason you do not turn on your computer for one month. Now all your backups are at least a month old, and if
you had specified the above backup strategy in terms of absolute ages, they would all be deleted! Specifying age ranges in terms of
backup cycles avoids these sort of problems.
expire_backups usage is simple. It requires backups to have names of the forms year-month-day_hour:minute:seconds (YYYY-MM-DD_HH:mm:ss) and
works on all backups in the current directory. So for the above backup strategy, the correct invocation would be:
expire_backups.py 1 3 7 14 31
When storing your backups on an S3QL file system, you probably want to specify the --use-s3qlrm option as well. This tells expire_backups
to use the s3qlrm command to delete directories.
expire_backups uses a "state file" to keep track which backups are how many cycles old (since this cannot be inferred from the dates con-
tained in the directory names). The standard name for this state file is .expire_backups.dat. If this file gets damaged or deleted,
expire_backups no longer knows the ages of the backups and refuses to work. In this case you can use the --reconstruct-state option to try
to reconstruct the state from the backup dates. However, the accuracy of this reconstruction depends strongly on how rigorous you have been
with making backups (it is only completely correct if the time between subsequent backups has always been exactly the same), so it's gener-
ally a good idea not to tamper with the state file.
OPTIONS
The expire_backups command accepts the following options:
--quiet
be really quiet
--debug
activate debugging output
--version
just print program version and exit
--state <file>
File to save state information in (default: ".expire_backups.dat")
-n Dry run. Just show which backups would be deleted.
--reconstruct-state
Try to reconstruct a missing state file from backup dates.
--use-s3qlrm
Use s3qlrm command to delete backups.
EXIT STATUS
expire_backups returns exit code 0 if the operation succeeded and 1 if some error occured.
SEE ALSO
expire_backups is shipped as part of S3QL, http://code.google.com/p/s3ql/.
COPYRIGHT
2008-2011, Nikolaus Rath
1.11.1 August 27, 2014 EXPIRE_BACKUPS(1)