Script assistance please...
Hi Folks,
I'm trying to create a script to create a .DMG of a given directory, then SCP it to another machine.
The script below successfully creates the .dmg I need (with date appended), but I'm not sure how to identify the DMG just created, to then SCP it to another machine, and after that, to delete it from the /tmp directory.
This will run via cron job when completed (it's on a 10.4.11 machine)
Your help is much appreciated!
Lurch
#!/bin/sh
# this daily script archives Filemaker Databases, and sends them to the server
PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH
hdiutil create /tmp/FMP-databases-`date +%m%d%Y`.dmg -srcfolder /FileMaker Server 5.5/Databases
exit 0
Here's the finished script, with huge thanks to BobHarris. I've created a few more variables at top to make it a little more portable:
#!/usr/bin/env bash
# this script archives a given folder into a compressed .dmg, appends a date onto the .dmg name, and and sends them to another machine
SOURCE="/Users/youraccount/yourfolder"
TMPFILE="/tmp/yourfolder-$(date +%Y%m%d).dmg"
# destination must be exact, absolute path on remote machine where backup is to be kept:
DESTINATION="/Volumes/Backups/backup-directory/"
SUBJECT="Success: Backup results `date`"
RECIPIENT="[email protected]"
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
hdiutil create "${TMPFILE}" -srcfolder "${SOURCE}" >/tmp/$$
sts=$?
if [[ ${sts} = 0 ]]; then
echo "hdiutil create successful!!" >>/tmp/$$
# display size in human readable format:
echo `du -sch ${TMPFILE}` >>/tmp/$$
else
echo "hdiutil create FAILURE!!" >>/tmp/$$
SUBJECT="hdiutil FAILURE: Backup results"
fi
# if the hdiutil was successful, then copy the file to backup server.
if [[ ${sts} = 0 ]]; then
scp -r -E "${TMPFILE}" [email protected]:"${DESTINATION}"
sts=$?
if [[ ${sts} = 0 ]]; then
echo "DMG backup successful!!" >>/tmp/$$
else
echo "DMG backup FAILURE!!" >>/tmp/$$
SUBJECT="scp FAILURE: Backup results"
fi
fi
# Send mail. This assumes Postfix or another MTA is already working on your machine
mail -s "${SUBJECT}" ${RECIPIENT} </tmp/$$
# Clean up temp files
rm -rf "${TMPFILE}" /tmp/$$
Similar Messages
-
Safari scripting, assistance please.
Hi there,
Is it possible to write an automating script for safari to open a link repeatedly over a certain period of time, ideally with set intervals.
Here's what Im trying to do,
My band is in a small competition on MySpace where the winner is the band with the most plays over two weeks, now if we cant script it, members of the band will be using a computer all day at work so they will be just hitting play all day anyway (maybe cheating but the other bands are doing it too so its only fair).
I know its a childish request, but hopefully someone wil be able to help!
ThanksSounds like a very bad plan.
The "hits" you're trying to get will not count as "new" and the server software would only send a "cookie" file to a new viewer.
Any repeated page load would not be included in any page "count" and could also be considered spamming for hits and then exclude your file from the competition.
Play better music (or play your best) and let the results fall where they may. -
Parent/Action Script advise, please
Hello
I am posting to ask for some advice. I have Flash MX 2004.
I have a series of thumbnails (Movie Clips) which seem to be
arranged over two layers (layers 1 and 2). Layer 1 holds each
individual thumbnail (movie clip) in several keyframes, so that
with Layer 1 highlighted, when I click on frame 1 I can see
thumbnail no. 1 on the stage, when I click on frame 2 I see only
thumbnail 2 on the stage, when I click on frame 3 I see only
thumbnail 3 on the stage, etc.
I see no Action Script when I click through the frames:
Layer 2, however, does appear to hold Action Script. Please
see here:
http://www11.brinkster.com/stevehigham/parent.html
When I click on Layer 2 frame 1 I can see Action Script for
the first thumnail:
gotoAndStop(_parent._name);
When I click on frame 2 I can see my second thumbnail, but
the same script:
gotoAndStop(_parent._name);
When I click on frame 3 I can see my third thumbnail, but
again the same script:
gotoAndStop(_parent._name);
I am trying to get my limited cognitive ability to grasp how
the file works (I bought it as a template) so that I can change it.
I wish to ask two questions. Does the gotoAndStop(_parent._name);
mean that every time I click on thumbnail 1 I go to this file:
--> _parent._name?
And does it mean that every time I click on thumbnail 2 I
also go to this file: --> _parent._name? Does it also mean that
every time I click on thumbnail 3 I go to the same file: -->
_parent._name?
When I go to Ctrl + Enter and click on the thumnails
(regardless of which one it is), I am always taken to the same
place. Is it this script, the _parent._name that takes me there? If
so, my second question concerns how can I change it - what is it in
the script that I need to change - so that each thumbnail takes me
to a different place?
Many thanks for reading such a long message!
SteveHello kglad
Thank you for your message.
In relation to your comment:
'you need to label your frame and you probably are supposed
to load that swf into another swf'.
How do I do that? If I create something new on my stage in a
new layer in the first frame how to I change the Action Script so
that when the thumbnail is clicked, I go to that particular frame
in that particular layer?
Thank you for your help.
Steve
Text -
Whenever I try to enter my credit card information into iTunes via either my mac book or my iphone it says there is an error and says "for assistance, please contact itunes support, etc...". Can anyone help with this?
I haven't had any luck at all getting it resolved using iTunes support so I'm hoping someone who's encountered the problem can help me.What did itunes suport tell you?
They will need to solve this. -
I keep getting a message to update my flash player, then a screen showing flash player pro appears, I don't have this on my iPad that I'm aware of. I cannot view videos etc (new to ipad) can anyone assist please.
Adobe has not made a version of Flash for the iPad.
Kappy explains why. https://discussions.apple.com/message/19446567#19446567
5 Flash Player Alternatives http://www.techshout.com/features/2011/01/flash-player-for-ipad-apps/
Top 4 browsers supports flash player on iPad and iPhone
http://mashtips.com/flash-player-ios/
Cheers, Tom -
Java Script Assistant in xMII 12.0
Hi All,
Kindly help me to find out the "Java Script Assistance in xMII 12.0" version.
Thanks
Rajesh Sivaprakasam.
Edited by: Rajesh Sivaprakasam on Nov 27, 2008 12:05 PMHelo Rajesh,
the Productivity Wizards are available under SDN->Downloads->for Manufacturing->xMII 12.0 Sample Projects and Tools.
Link:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/e0171f05-98c6-2a10-f5a0-8f2ec79d10a4
Regards
Pedro -
Script Assist in Actions Panel
In the Flash MX Professional I do not have the option of
activating the Script Assist function. I'm not well-versed in
actionscript and need the assistance to make my projects
functional. I work on a Mac using OS X Panther. Has anyone else run
into this problem and, if so, how did you resolve it? TxHEY! SCREW OFF! i was trying to help you out you ******* -
and providing a little levity from the title you've posted - i
thought it was a great title and a fun way to ask - apparently you
didn't see the 'just kidding - wink" - i thought that was exactly
the answer you were looking for but didn't know what to call it -
so SCREW OFF YOU PR!CK!
you don't know what you talking about - if all you saw was
comics dipsh!t, you didn't look around or notice anything else -
not to mention that i script for a living and none of those were
'web comics' - I've got more abilities than you will ever have!
to call someone a '****' in your second post! holy crap -
what an *** - don't come around here anymore, you don't have any
business even thinking about trying to code ... LMFAO! -
Gallery script help, please
Gallery script help, please
Hello,
I'm new to actionscript in general, I do know a little...
I foung a gallery script, modified many things, the images
open fine, everything is working, but here's the thing:
the gallery is in 3 sections, red, blue and yellow.
I would like to know how, what, and where to put a script so
that if a "the small red image #1" is clicked, I can load any sort
of a movie on top of the "the BIG red image #1" or #2 or 3 and so
on...same goes for the blue and yellow...
If I figured things correctly on my own...the small thumbnail
images of the gallery are not buttons, that's why I can't attach a
movie (let's say) to them...but it is all written in script, using
the horizontal and vertical position of the mouse to open the large
images of the gallery...
So, I don't know how to figure things out, to attach a
specific movie to a specific thumbnail...
p.s.: I think the script that controls the gallery is in
symbol 120
I really would appreciate the help
Merry Christmas in advance to everyone
Sandra
here are all the files...
http://www.gentro.ca/sandra_test.zipThere's a great tutorial on kirupa...
click
here for link -
Hi,
I getting this error press on upload button , its working in google chrome and firefox
Error Page protection violation:
This may be caused by submitting a page that had not yet finished loading or by manual alteration of protected page items.For further assistance, please contact theapplication administrator.Contact your application administrator.
Please help me any oneFirst, please don't post questions/issues and start with "Very Urgent". If you have an "urgent" issue I recommend you contact Oracle Support. Second, if your issue is so urgent, I further recommend that you read this (url below) before going any further. Posting questions without including product names, versions, and related information like platform, configuration and so on, will make it almost impossible for anyone to help you.
http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
Finally, I am going to guess and say that you are having problems with Oracle Apex version 4.2. If I am correct, I will tell you that this forum space is for Oracle Forms. APEX questions should be posted here (below). However, if you plan to post the same issue there, please consider reading the blog I mentioned above and follow its recommendations before posting anywhere else.
https://community.oracle.com/community/developer/english/oracle_database/application_express -
My X1 version of Adobe no longer opens bank documents -"later version of Stratia required". Can you assist please?
Sorry but what is your answer to my enquiry?
-
Hi,
Apparently the default country for an account is US. I want it changed to Netherlands without having to call customer service. In need of assistance please, is there someone from Adobe on this forum who can help me? Or does someone know an email address?
thanks!
Arjan de JongChange/Verify Account https://forums.adobe.com/thread/1465499 may help
-http://helpx.adobe.com/x-productkb/policy-pricing/change-country-associated-with-adobe-id. html -
UCCX 8.5.1 Scripting Assistance - Set Priority
Hello,
I am trying to configure the priority in my script similar to how they did this in the below discussion.
https://supportforums.cisco.com/discussion/11892936/uccx-851-basic-scripting-assistance-set-priority
When I put the "set priority" in the script it errors out and callers hear the message that the system is experiencing problems. The script runs fine without the "set priority". Any assistance would be greatly appreciated.Chris,
I attempted to validate the script and did get an error with the "Set Enterprise Call Info" step. What's odd is that without the priority step the script still does not validate, but actually works fine. As soon as I add the priority step to it though it breaks.
I removed the "Set Enterprise Call Info" step and the priority works as expected now. Thank you for your assistance.
Jared -
hi, i am really new to photo shop and i have a logo design which i need to have the background made transparent from a white square? can anyone assist please?
i have already got the image on my screen but cant seem to find the tool in which to make it transparent as i do with other softwares.hi aknaloku,
is the background apart of your image or is the image on a different layer?
if the white background is on a different layer you can simply delete the layer for the layers window which you can find in Window>Layer. you will need to delete the background layer by dragging it into the little rubbish bin icon down the bottom right of the layers window.
i hoped this helped
Matty -
my computer is dead. the charger flashes green and orange when connected to the computer. can anyone assist please.
What happens when you press the power button?
Try a SMC reset:
http://support.apple.com/en-us/HT201295
Ciao. -
Hello please forgive me as I am new to this but really need assistance. I have a form created in html on a site and have tried numerous tutorials on creating a php script which would be linked to this html form, but each one I try either doesn't work or it seems as if it goes through but then I never recieve the mail in my mailbox. I used my yahoo account as well as another account and didn't get anything , can anyone please assist as to what I should do here is what I have so far.
Thank you in advance for any assistance provided.
HTML:
<form name="contactform" method="post" action="mailer.php">
Name <input type="text" name="name"/><br/><br/>
Email <input type="text" name="email"/><br/><br/>
Address <input type="text" name="address"/><br/><br/>
City <input type="text" name="city"/><br/><br/>
When to Contact <select name="dropdown">
<option value="Morning">Morning</option>
<option value="Afternoon">Afternooon</option>
<option value="Evening">Evening</option>
</select><br/><br/>
Purpose of Contact <br/><textarea name="commment" rows="6" cols="40">
</textarea><br/> <br/><input type="submit" value="Submit Form Now" name="submit"/>
</form>
Here is the script that I am using :
<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = "Inquiry Form";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$address_field = $_POST['address'];
$city_field = $_POST['city'];
$comment= $_POST['comment'];
$dropdown = $_POST['dropdown'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
$body = "From: $name_field\n E-Mail: $email_field\n $check_msg Option: $option\n Drop-Down: $dropdown\n Message:\n $message\n";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "Form not Submitted!";
?>Hello thank you for responding... yes I believe it is , I have used a drag and drop flash component with a php script for another project I had worked on not too long ago and it worked fine. Im pretty sure it is running.
Does the code and script that I provided look correct to you?
Maybe you are looking for
-
After upgrade to 10.9.3 - Finder don't open
Hi All, After I upgrade OSX to 10.9.3 my finder don't open anymore or sometimes the finder screen open and close in a loop. I tried to clean all system cache, but anything happens :-( I cannot restore any backup because the problem didn't permit me t
-
Lost all photos on my iPhoto and get the ERROR WRITING TO DISK when trying to reload from Time Machine. iPhoto cannot import your photos because there was a problem writing to the volume containing your iPHOTO LIBRARY . Looking for solution.
-
Error Message SCCM 2012 ERROR: Unable to access target machine for request
Should I be concerned with this message, or will it resolve on its own? ---> ERROR: Unable to access target machine for request: "2097153953", machine name: "MININT-NAEAFL", access denied or invalid network path. SMS_CLIENT_CONFIG_MANAGER 4/21/2015
-
How do I export *.TDMS file format to *.UFF file format?
Hello How do I convert TDMS file to UFF file? I've heard that it's possible to convert the file by using Labview. Is it true? I can't find the method in Labview. The version is Labview 8.6 By using SignalExpress, I can convert TDMS file to UFF file.
-
Issues with MDM installation - Windows + MaxDB 7.7
I list here some observations resulting from the installation of MDM on Windows with MaxDB You can find the documentation here: http://service.sap.com/installMDM Important is the Installation Guide. 1) only two files are needed: MDM: 51032724.zip (m