Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OD archive





----- Original Message ----
From: Rusty Myers <email@hidden>
To: Peter J. Russell <email@hidden>
Cc: dboyer <email@hidden>; email@hidden
Sent: Thursday, 24 July, 2008 12:47:23 PM
Subject: Re: OD archive


I use a launchd item which I wrote to run an odarchive script every evening at about 8:30pm.  This backs up to file with a specified password and can be restored through the ServerAdmin GUI if anything goes awry.

The main crux of the script is:

echo "dirserv:backupArchiveParams:archivePassword = mypassword" > /var/root/command.txt
echo "dirserv:backupArchiveParams:archivePath = /path/to/backup/odarchive" >> /var/root/command.txt
echo "dirserv:command = backupArchive" >> /var/root/command.txt
serveradmin command < /var/root/command.txt
rm /var/root/command.txt

Thanks for the script, I will be looking into using it. 
Question.
Is there a reason why you are using a command.txt file to store the commands and then deleting it, instead of a set script with all variables that you need? Seems like over complication to me. No offense, I'm sure there is a good reason. =)

Thanks
Rusty
----------------------------------------------------------------------------------

Hmm..... good question...



I think it was to do with passing the `sudo serveradmin command....` input as one directive from the text file generated.

By using the text file, if I want to change any parameters or password, etc, I can just edit the script (which I suppose would be the same as just editing the text file).

I'm just happy that it works and don't want to change it :-p

Cheers,
PJR
--


Send instant messages to your online friends http://au.messenger.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.