Gravatar Correct me if I'm wrong - but, doesn't the "prune" tool just remove all files stored in a bucket? If that is what it's doing (and I'm not just reading it wrong), wouldn't it be nice if "prune" removed only files not found in the original backed-up dir?

ie, on a schedule, you'd run "backup", then "prune". Otherwise, "prune" is more like "cleanup".


Gravatar How big of a directory can I run backup on before I cause a severe problem for my server? Let's say I have nearly a million files in a directory... is this going to help me, or are the memory limits of php and the script timeout functions going to cause problems?


Gravatar 7faed6 d311db1e61


Gravatar Hi, I found your tools while I was creating my own S3 backup program.
I didn't try your S3Backup program, but as I read your code I saw the same problem than in the first version of my program. If you try to backup a file with a space in its name, you will get an error (because your request will be something like:
"PUT /dir/file with space HTTP/1.1"
instead of:
"PUT /dir/file+with+space HTTP/1.1").
The solution is to use urlencode() on the directories and files names. But take care of urlencode each name part, not the full path (because you will get "%2Fdir%2Ffile+with+space").

I hope it could be usefull.

Cheers,


Gravatar Hi

good effort, I am making my own S3 Backup system using PHP I read your classes for ideas and wanted to suggest for future versions what I am going to do with my programme,

1 - i will prefer to tar the whole directory and then move it rather than moving all files and directories AS IS to Amazon servers

2 - i will also put an option to backup automatically the related database for sites etc and add them to the tar package

3 - store backups weekly but to prune / remove backups which are more than two weeks old to manage my space well on amazon.

anyway, good work!


Gravatar I'm confused about prune, is it just deleting everything in a bucket? Or is it deleting whatever is not on the local server any more?


Gravatar it will delete full bucket.


Gravatar Hi,

Thanks for the great class. I gave this a test and it worked great. However, the directory I tested was full of css files and for some reason it saves the as jpg file type? How come?

In the browser it reads test.css (JPEG Image)

any advice?


Gravatar I've been working on my own backup scripts, but I haven't been using PHP. I noticed that you have a Prune class which sounds interesting to me, I think that would be helpful to ensure that I don't store too much data on S3.

Would there be a possible reference for building a Prune function using regular shell scripts instead of PHP?

http://blog.datajelly.com/2008/0...-to- amazon.html


Gravatar Thanks for this! Just what I needed. I'm now successfully backing up my pictures from my photography portfolio site to S3. If I'm lucky I'll be able to tie this up with phpMyBackupPro so I can dump my MySQL database and send it along with them, and then all my backups will be very simple indeed...




Name:

Email:

URL:

Comment:  ? 

 

Commenting by HaloScan