I'm trying to backup Wordpress files and database with a shell script. I found one online that works great and am trying to work it a bit to provide more notices and progress info as well as work on some problems I'm having.
For starters... when I run this I get a notice after Create the archive... and Append the dump to the archive...
"tar: Removing leading `/' from member names"
Does anyone know what this means, and what I can do about it? This is run in a shared hosting environment if that helps.
Also, I'm sort of new to shell scripting but how can I add some kind of progress notice after each step, or a blinking ellipsis to designate that there is an ongoing process taking place. And one other thing... would there be a good way to secure the DB credentials so they aren't just out in the open? Also, how could I set this to cycle the files every month or set time period... like 30 days?
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Just means that tar removes the leading "/" because when you tar the files, it will be relative to the directory where you untar the files.
If you untar a file and the archive contained the leading "/" then you would not have control over where the file is untarred, and then you might overwrite an exiting file by accident
hello guys
i am new and i am using Solaris 8 as operating system. i have some CD and i want to install the data from it. Package and patches. Which command shall i use?
thanks (3 Replies)
Dear friends, I need your help.
I need to create a bash script which can loop through $source_dir once a month, and find the backup of the last day of a given month for each of the 2 file types, as can be seen below.
Assume that source_dir="/backup/daily"
Assume that... (1 Reply)
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)
i need to print the first date of the previous month in 20130101 format.
i use the below script
month_year=$(date +'%m%Y' | awk '!--$1{$1=12;$2--}')
m=${month_year% *}
y=$month_year##* }
d=$(cal $m $y | paste -s - | awk '{print $NF}')
firstdate=${printf '02d01%s' $y $m)
echo $firstdate
... (1 Reply)
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)
Hi,
I am a linux newbie and I dont have any knowledge on scripting but this is my urgent requirement. I am suppose to write a backup script for 2 of my servers, could someone help me out please. below is my requirement
Mail Server 1 : 10.0.0.1 Mail Server 2 : 10.0.0.2 Backup Server... (6 Replies)
Hello all,
I am trying to backup my system database and root filesystem on remote server that is mounted on my system using tar command.
For the database, i use (cd /database; tar cvf file.tar .)
for the Root filesystem, i use (cd /; tar uEvf file.tar .)
both are to be backup on the same... (1 Reply)
am writing my very first shell script and need some assistance. What I need help on is three things in particular.
1) Do I need to use the sleep function after the tar command or does the script know to wait until tar finishes to move on to the next line?
2) Did I populate the variable DATE... (4 Replies)
I'm having an issue with a problem
A problem with this backup script is that if you backup the same file twice, you may get a warning message because you're overwriting an existing file. You could suppress the warning message, but a better solution is to save a series of backups distinguished by... (1 Reply)