how do I move an album to another gallery installation?

amckay

Joined: 2002-10-26
Posts: 2
Posted: Sat, 2002-10-26 11:48

is there any easy way to move an entire album from one gallery installation to another? I'm dividing up my galleries among several domains, each with their own gallery. I've kind of hacked it up but I always get an 'error' album.

thanks,
-Alan

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Sat, 2002-10-26 18:43

Create a new album of the same name in the new location via the Galley web page. Then go to that album's directory (new location) and remove all the files inside (albumdb.dat, etc.). Then copy over everything from the old directory for that album. You'll need to make sure that you give the webserver user write permission on all of these files of course.

 
amckay

Joined: 2002-10-26
Posts: 2
Posted: Sat, 2002-10-26 22:07

thanks

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7988
Posted: Sun, 2002-10-27 19:05

Try doing it this way.

1. In the original Gallery, move the album to the top level (so that it's visible from albums.php)
2. Run the "cleanup" script (from the User Guide) either on the specific album, or on all the albums.
3. Copy the specific album from the albums directory from the old Gallery's albums directory to the new Gallery's albums directory
4. In the new Gallery's albums directory, run "chmod -R 777 <albumdir>"
5. Go to the last page of the top level of the new Gallery -- the album should now appear there

 
ScottMcW

Joined: 2002-10-18
Posts: 21
Posted: Mon, 2002-10-28 03:21

Is there any way to do all this if you don't have root or even shell access? I can't run "chmod -R 777 *" from my FTP client. But, if I put it into a php page, will THAT work?

Thanks,

Scott

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Mon, 2002-10-28 05:44

Yikes. No, you can't do the chmod with PHP, since whatever you write will be run as the Apache user, so you run into a brick wall for the same reason you need the chmod -R 777 in the first place: the Apache user can't write to those files.

The only thing I can think of is if your FTP site supports the umask or site umask command. If it does, type umask 000 in FTP. *Then* FTP your files up to the new server with the mput command. In theory (?), the files will then be set to 0777. However, my ISP doesn't implement umask on its FTP, so this couldn't work for me :sad: .

Anyone else have ideas?? Is *anyone* running a spiffy FTP client with bells and whistles that will do recursive chmods?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7988
Posted: Mon, 2002-10-28 19:30
Quote:
Anyone else have ideas?? Is *anyone* running a spiffy FTP client with bells and whistles that will do recursive chmods?

I use lftp which supports recursive chmod. But it's also a command line Unix ftp client .. not sure if that's going to cut it for you.

 
ScottMcW

Joined: 2002-10-18
Posts: 21
Posted: Tue, 2002-10-29 05:35

Sadly...it won't for those of us without command line access!

Hmm...any other ideas for moving a Gallery install if you don't have command line access? I'm lucky that I haven't fully built out my site yet. But, I'm building it on a test server, and it will be using Gallery extensively! So, I WILL need to move it.

But, I have a back-up plan that I might have to use. I'm going to register a secondary name to the server and build the site with that. Then, once it's up and running, transfer the final DNS info to the server.

But, it'd would be nice to know that I COULD move it later if I needed to!

Thanks,

Scott

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2002-10-29 12:35

The only thing you'll need to save is the albums directory. But this still presents the problem of file permissions--I don't know how you'd get around it without cmd line access or a whole lot of time (to chmod every file in the album directory)...

 
ScottMcW

Joined: 2002-10-18
Posts: 21
Posted: Wed, 2002-10-30 05:18

Well, I tried CHMODing to 777 every file in the Albums directory, and that didn't work. I have about 17 albums, and I got every file. I would be willing to go that route, if it worked, but it doesn't seem to.

Also, would there be any security issues doing it that way?

Still looking for ideas! :smile: