05-06-2014
Script to remove backup files
HI,
I want to remove my backup files keeping last 30 days.
Now i am doing it manually.
Does anyone have a script to automate this process?
Thanks in advance
10 More Discussions You Might Find Interesting
1. Solaris
I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to... (3 Replies)
Discussion started by: valicon
3 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to write a command that backs up certain files into my current directory and adds a prefix to the backed up file name. I realise this can be done in a script by specifying each individual file but would like to know if it can be done on one line and made an alias.
I have the... (5 Replies)
Discussion started by: m223464
5 Replies
3. Shell Programming and Scripting
Hi,
I wrote a simple script to backup of index.php and index.html in my box. So, I wrote a script which take a copy of the index page as 1Mar09: but it does not comes up..
#! /bin/bash
find . -name index.* > domains.txt
for i in `cat domains.txt` ; do cp index* index*.1Mar09 $i; done
But... (6 Replies)
Discussion started by: gsiva
6 Replies
4. Shell Programming and Scripting
Im working on a shell script that uses three parameters, a string to replace, the string replacing, and a file name.
In this script it makes a back up file before the replacement occurs. However I want to be able to either search the file to see if it has the string and if it doesnt dont create... (5 Replies)
Discussion started by: gordonheimer
5 Replies
5. Shell Programming and Scripting
# find /home/shantanu -name 'my_stops*' | xargs ls -lt | head -2
The command mentioned above will list the latest 2 files having my_stops in it's name. I want to keep these 2 files. But I want to delete all other files starting with "my_stops" from the current directory. (3 Replies)
Discussion started by: shantanuo
3 Replies
6. Shell Programming and Scripting
I am trying to copy files from one directory to another using shell script. Can anyone please troubleshoot the code.
thanks in advance...
#!C:\Shell\sh.exe
files_dir="C:\Documents and Settings\scripts\files"
backup_dir="C:\Documents and Settings\scripts\ztest"
echo cding to... (2 Replies)
Discussion started by: sureshcisco
2 Replies
7. Shell Programming and Scripting
Hi Friends,
I need help. I have around 100 users. I want to take date wise backup of files which are on desktop for every user.
My user directory path is -: /home/dr/<user_name>/Desktop
1) Script has to run on a perticular time everyday
2) Script has to take backup of all files present... (2 Replies)
Discussion started by: paragnehete
2 Replies
8. Shell Programming and Scripting
Hi Everyone,
we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment?
Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies
9. Shell Programming and Scripting
Hi Guys,
I'm very new to bash scripting. Please help me on this.
I'm in need of a backup script which does the ff.
1. If a file is larger than 5GB. split it and tar the file.
2. Weekly backup file to amazon s3 using s3rsync
3. If a file is unchanged it doesn't need to copy to amazon s3
... (4 Replies)
Discussion started by: ganitolngyundre
4 Replies
10. Shell Programming and Scripting
we want to backup all opened files by vi before editing also with version information. i wrote below alias to backup crontab file content with version info. What i want know is to make this opened files by vi. We want to prevent user mistakes by adding this alias.
alias crontab='DATE=$(date... (4 Replies)
Discussion started by: sebu
4 Replies
LEARN ABOUT DEBIAN
nngoback
NNGOBACK(1) General Commands Manual NNGOBACK(1)
NAME
nngoback - make news articles unread on a day-by-day basis (nn)
SYNOPSIS
nngoback [ -NQvi ] [-d] days [ group ]...
DESCRIPTION
nngoback will rewind the .newsrc record file of nn(1) one or more days. It can be used to rewind all groups, or only a specified set of
groups. In other words, nngoback can mark news articles which have arrived on the system during the last days days unread.
Only subscribed groups that occur in the current presentation sequence are rewound. That means that if no group arguments are specified,
all groups occurring in the sequence defined in the init file will be rewound. Otherwise, only the groups specified on the argument line
will be rewound.
When a group is rewound, the information about selections, partially read digests etc. are discarded. It will print notifications about
this unless the -Q (quiet) option is used.
If the -i (interactive) option is specified, nngoback will report for each how many articles can be marked unread, and ask for confirmation
before going back in that group.
If the -v (verbose) option is specified, nngoback will report how many articles are marked unread.
If the -N (no-update) option is specified, nngoback will perform the entire goback operation, but not update the .newsrc file.
If you are not up-to-date with your news reading, you can also use nngoback to catch up to only have the last few days of news waiting to
be read in the following way:
nn -a0
nngoback 3
The nn command will mark all articles in all groups as read (answer all to the catch-up question.) The following nngoback will then make
the last three days of news unread again.
Examples:
nngoback 0
Mark the articles which have arrived today as unread.
nngoback 1
Mark the articles which have arrived yesterday and today as unread.
nngoback 6
Mark the articles which have arrived during the last week as unread.
You cannot go more than 14 days back with nngoback. (You can change this limit as described below.)
THE BACK_ACT DAEMON
It is a prerequisite for the use of nngoback that the script back_act is executed at an appropriate time once (and only once) every day.
Preferably this is done by cron right before the bacth of news for `today' is received. back_act will maintain copies of the active file
for the last 14 days.
Optionally, the back_act program accepts a single numerical argument specifying how many copies of the active file it should maintain.
This is useful if news is expired after 7 days, in which case keeping more than 7 days of active file copies is wasteful.
FILES
~/.newsrc The record of read articles.
~/.newsrc.goback The original rc file before goback.
$db/active.N The N days `old' active file.
$master/back_act Script run by cron to maintain old active files.
SEE ALSO
nn(1), nncheck(1), nngrab(1), nngrep(1), nnpost(1), nntidy(1)
nnadmin(1M), nnusage(1M), nnmaster(8)
NOTES
nngoback does not check the age of the `old' active files; it will blindly believe that active.0 was created today, and that active.7 is
really seven days old! Therefore, the back_act script should be run once and only once every day for nngoback to work properly.
The days are counted relative to the time the active files were copied.
AUTHOR
Kim F. Storm, Texas Instruments A/S, Denmark
E-mail: storm@texas.dk
4th Berkeley Distribution Release 6.6 NNGOBACK(1)