How do I backup pictures, albums, and data in G2?
We only store data in the gallerydata directory (as specified in your config.php) and the database. So back up those two (tar up the directory, dump the database however you like) and you're all set. You can skip backing up the files in the gallerydata/cache directory if you want, but you'll need the directory structure when you restore it.
Actually, I was thinking about writing something more elaborate than "tar up the directory and dump the database" for quite some time. The 'use case' is when you want to move one or several albums from one server to another. You want to make it user-friendly for administrator to backup and restore the albums. Current Gallery1 option limits you to backing up the whole gallery, which makes it very difficult (if not impossible) to move it to a new server unless you have double the amount of space on the new server.
Obviously, it may be too early to develop such module (or maybe I just need a reason to procrastinate hoping that somebody will do it for me) - but I would hope that esteemed PM will put it on a wish list 8)
Yep, it would be nice to have something like that. David, please get that on the list would you? Thanks!
Well, here is my attempt at a custom modules - Backup and Restore. It is still "alpha" - it does 50% of what I would like it to do, and 80% of what I really need it to do. It doesn't handle album trees (only individual albums), and it loses some significant metadata like view counts, layouts, highlights... The backup saves the metadata in the 'backup' subdirectory of whatever you specified for your base data directory. In order to do the restore you also need to copy the actual data files to the same directory.
My typical use for it is the following: I import albums from G1 to G2 on my production machine (which doesn't have much space left); then back up metadata, copy metadata and albums to development box and restore into G2...
In short, it is far from 'prime time'. However, before I carry on with my perhaps flawed design decisions, I'd appreciate some feedback from the development team... I put plenty of comments in the code, including missing blocks (TODO) and some design choices that still need to be made (eg., how to handle permissions)
Thanks in advance.