04-21-2011
Script for taking backup of desktop files.
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 in "Desktop" directory
3) Make a tar with name "yyyy-mm-dd-desk-files"
4) Make directory outside "Desktop" with name "Desktop-Backup", if already exist then don't make this folder.
5) The tar have to moved in this folder.
6) Remove the files from "Desktop" directory. (i.e. Desktop should be empty)
7) Mail the status that "Backup Successful"
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello Guys:
Would like to know how to take an entire system backup.. Here is the entire scenario.. I am working on a system that is AIX RS6000 M80 Server. We have loaded the OS and installed all the patches and then we took an entire system backup. We also verified by restoring the same... (2 Replies)
Discussion started by: ST2000
2 Replies
2. Shell Programming and Scripting
I want to write a script that tells me if the tape device is ready, if the answer is not yes ($?is not 0) i get an answer that the tape_device is not ready. If the tape is ready i can do a
tar -cvf $tape1 * .
How can i write a script to control if the tapedevice is ready or not?
How can i... (1 Reply)
Discussion started by: eddyvdv
1 Replies
3. UNIX for Advanced & Expert Users
Friends, while taking backup on /dev/rmt/0cn it is showing device does not exists.
I have checked /dev/rmt 0cn is present there with link file created in /devices/pci@8,700000/scsi@5/st@5,0:cn
I have checked cd /devices/pci@8,700000/scsi@5 but st@5,0:cn is not there. But I found st@3,0:cn.
... (3 Replies)
Discussion started by: ailnilanjan
3 Replies
4. 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
5. 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
6. HP-UX
Hi Experts,
When i taking backup of my servers in Tape Library simultaneously the Temp folder is getting full...... these file like OB2DBG*.txt (2 Replies)
Discussion started by: purushottamaher
2 Replies
7. 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
8. Shell Programming and Scripting
Hi ,
I am a newbie!!!
I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file? For eg:... (12 Replies)
Discussion started by: jhilmil
12 Replies
9. 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
10. AIX
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 (5 Replies)
Discussion started by: ElizabethPJ
5 Replies
BACKUP(8) System Manager's Manual BACKUP(8)
NAME
backup - backup files
SYNOPSIS
backup [-djmnorstvz] dir1 dir2
OPTIONS
-d At top level, only directories are backed up
-j Do not copy junk: *.Z, *.bak, a.out, core, etc
-m If device full, prompt for new diskette
-n Do not backup top-level directories
-o Do not copy *.o files
-r Restore files
-s Do not copy *.s files
-t Preserve creation times
-v Verbose; list files being backed up
-z Compress the files on the backup medium
EXAMPLES
backup -mz . /f0 # Backup current directory compressed
backup /bin /usr/bin
# Backup bin from RAM disk to hard disk
DESCRIPTION
Backup (recursively) backs up the contents of a given directory and its subdirectories to another part of the file system. It has two typ-
ical uses. First, some portion of the file system can be backed up onto 1 or more diskettes. When a diskette fills up, the user is
prompted for a new one. The backups are in the form of mountable file systems. Second, a directory on RAM disk can be backed up onto hard
disk. If the target directory is empty, the entire source directory is copied there, optionally compressed to save space. If the target
directory is an old backup, only those files in the target directory that are older than similar names in the source directory are
replaced. Backup uses times for this purpose, like make. Calling Backup as Restore is equivalent to using the -r option; this replaces
newer files in the target directory with older files from the source directory, uncompressing them if necessary. The target directory con-
tents are thus returned to some previous state.
SEE ALSO
tar(1).
BACKUP(8)