Sponsored Content
Full Discussion: A backup script
Top Forums Shell Programming and Scripting A backup script Post 82985 by pascal on Friday 9th of September 2005 05:04:51 AM
Old 09-09-2005
A backup script

Hello

I'm a new user of this forum. English is not my natural language so excuse me by advance if my sentences are not always really understandable :-p

Well here is my problem.

I use a panel and I need to use the backup command of this panel to backup all my customer account (created under this panel)
I may use an option like "backup --domains=*all" but in this case the backup command run during more than 3 hours and use huge ressources (cpu, etc..)
So my idea is to create a shell script to backup some domains every hours. For example every domains that begin by "A*" would be backuped at 01:00AM, every "B*" at 02:00AM, etc....

I have the list of all domains listed in /etc/httpd/conf.d

My idea is to do soemthing like this
Quote:
PATH2CONF=/etc/httpd/conf.d

CAse current hour = 01 then DOM = a*
Case current hour = 02 then DOM = b*
etc ...

RSLT=`ls -1 domain.com.conf_to_ignore /$PATH2CONF/$DOM`

for TOBACKUP in $RSLT; do
Remove the .conf at the end of domain.com.conf
BACKUP --domains=$tobackup
done
My two main problems are :
1/ I don't know how to write in SHELL command the line
Quote:
CAse current hour = 01 then DOM = a*
2/ I don't know how to remove the .conf at the end of the $TOBACKUP (domain.com.conf)

Of course it is not a very beautifull script. It could be best to calculate the number of existing domains then divise it by 24 hours and backup the result every hours, but for me it become to strong :-p so I prefere to begin by soemthing simple

There is maybe others solutions to not backup all my customer account in one shot but few per hours or days.

I'd really apreciate your help about my 2 mains pbms and all advises/comments you may give me to realise this.

Thanks a ton

Pascal
 

10 More Discussions You Might Find Interesting

1. AIX

Backup Script

I'm not sure if this is the place to ask this question but I have a script on an IBM RS6000 that has quit working. I can manually run a backup using SMIT and it appears okay, but not sure about the script. ----------code------------ #!/bin/ksh #set -x echo backup beginning date find... (7 Replies)
Discussion started by: geek4sur
7 Replies

2. UNIX for Dummies Questions & Answers

Backup Script

Hi, My SCO Unixware 7.1.1 box is setup to run an EOD backup script, which is as follows: ---------------------------------------------------------------------- start End-of-day compress $BASE TO /home/compdir write /home/compdir to DATTAPE end ... (0 Replies)
Discussion started by: tayyabq8
0 Replies

3. Shell Programming and Scripting

help in backup script

Hello folks. Good Day! i want to backup /var/www directory backup to another system daily basis incremental backup and weekly full backup. Directory name where it should automatically created like 2010-04-20 i mean via script. Can some one help? (7 Replies)
Discussion started by: learnbash
7 Replies

4. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

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

5. Shell Programming and Scripting

Need help in creating file restoration script from a backup script.

Hi all i am struggling in creating a restore of env files while doing applications clone. the first file i created for copying the important configurations file which is running perfect now for reverting the changes i mean when i am restoring these files to its original places i have to do... (7 Replies)
Discussion started by: javeedkaleem
7 Replies

6. Shell Programming and Scripting

Backup script / Test if script is already running

Hello everyone, I have 2 questions : 1) I have a backup shell script, let's call it backup.sh, that is called every hour as a cron job. As a matter of fact a backup could last more than one hour. It mounts a NAS and then do some rsync on important directories, so really I don't want to... (2 Replies)
Discussion started by: freddie50
2 Replies

7. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

8. Shell Programming and Scripting

Shell script to call Oracle archive backup script when file system reaches threshold value

Hello All, I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60% Need to identify the unique file system that reaches threshold value. ex: capacity ... (4 Replies)
Discussion started by: sasikanthdba
4 Replies

9. Shell Programming and Scripting

Backup Script

I have write the following script, its execution i got following error: !/bin/sh # # dy='date +%d%b%y' hn="ECTMPROD12" bk='/home/backup' sb=$bk'/'$hn # # cm_d01='tar -czf /home/backup/'$hn'_'$dy'_ofhome.tar.gz /home/oracle/ofhome' # # echo "***** start time of ECTMPROD12 backup full"... (3 Replies)
Discussion started by: rizwan.shaukat
3 Replies

10. Shell Programming and Scripting

Backup Script

I don't know how to repair this script :/ My OS: Ubuntu Server 18.04 "Bionic Beaver" LTS (64bits) #!/bin/bash # ### Ustawienia - sciezki do plików ### DIRS="/home/ts/ /home/mc/" BACKUP=/home/backup.$$ NOW=$(date +"%d-%m-%Y") DELDATE=$(date -d "-7 days" +"%d-%m-%Y") DAY=$(date +"%a") #... (4 Replies)
Discussion started by: xCraftRayX
4 Replies
panel_userptr(3CURSES)					     Curses Library Functions					    panel_userptr(3CURSES)

NAME
panel_userptr, set_panel_userptr - associate application data with a panels panel SYNOPSIS
cc [ flag ... ] file ... -lpanel -lcurses [ library .. ] #include <panel.h> int set_panel_userptr(PANEL *panel, char *ptr); char * panel_userptr(PANEL *panel); DESCRIPTION
Each panel has a user pointer available for maintaining relevant information. set_panel_userptr() sets the user pointer of panel to ptr. panel_userptr() returns the user pointer of panel. RETURN VALUES
set_panel_userptr returns OK if successful, ERR otherwise. panel_userptr returns NULL if there is no user pointer assigned to panel. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), panels(3CURSES), attributes(5) NOTES
The header <panel.h> automatically includes the header <curses.h>. SunOS 5.10 31 Dec 1996 panel_userptr(3CURSES)
All times are GMT -4. The time now is 12:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy