Greetings!
I have tested this with ZEO 1.0b4
So I will assume it will also work for those running standalone Zope Servers.
Purpose
To automatically compress Data.fs using cron.
- Backup Data.fs before packing.
- Pack Data.fs
- Check for file existence.
Assumptions
Your server is secured/ hardened. We don't want anyone else controlling cron.
You know a little linux shell scripting.
Procedure
Step 1
For better security:
Create a new file: auth.conf
This will contain your authentication information.
This is so that we can isolate the auth info from the script.
You can optionally put this auth.conf and your compression script in a separate folder.
This is just for ease of use.
Sample auth.conf
ZOPE_AUTH=username:password
That's it! Just one line.
Like I said, this is just to isolate the authentication info from the script.
Step 2
Then here comes the script that will do all the work for you. grins
Note: Some lines are quite long thus, they wrap along the sides.
Just make sure you get them correctly.
ZOPE_PATH - Where Zope resides. JOBS_PATH - This is optional. Where you will place your compression script and auth.conf file. STAMP - This is the time stamp that will be used in the backup file.
Current setup:
%b - locale's abbreviated month name (Jan..Dec) %d - day of month (01..31) %Y - year (1970...) ZOPE_COMMAND - This is the command for accessing your Data.fs ZOPE_ADDRESS - This is your server location. Perhaps you can use "http://localhost:port". I didn't test it though.