Using tar to transfer albums from G1 to new server

hmallett

Joined: 2007-01-18
Posts: 2
Posted: Thu, 2007-01-18 23:10

Hi all,
This might not entirely be a Gallery question, but please bear with me!

I'm moving my gallery from one server to another, and am going to take the opportunity to migrate from G1 to G2 at the same time.

What I propose to do is to tar up the albums folder from my G1 installation, transfer it to the new server, untar it, and put it in a temporary location to use the G1 import module.

I've tested it as much as I can on the existing server, but where I'm falling down is that when I tar up the albums folder, it's missing all the files starting with . - this includes the users data.

So I suppose my questions are:
1) What options do I need to use with tar to get it to include the fles starting with . ?
2) Can you see any problems with this approach?

It's GNU tar, BTW.

Thanks in advance,
H

 
ivan_bev

Joined: 2006-04-10
Posts: 14
Posted: Sat, 2007-01-20 16:39

You don't say what command-line you use. I don't believe I have had a problem when trying to archive a whole directory + contents, eg:

tar cjvf /tmp/g1albums.tar.bz2 /var/www/albums

If you did something like the following, I can see why it didn't include "dotfiles":

tar cjvf /tmp/g1albums.tar.bz2 /var/www/albums/*

The * doesn't match dotfiles as they are considered "hidden files" in unix. If you *really must* do it this way, something like the following should work:

tar cjvf /tmp/g1albums.tar.bz2 /var/www/albums/* /var/www/albums/.??*

-

I use rsync over ssh to copy from one server to another (in this kind of case) a la:

rsync -avxHPe 'ssh -x' /var/www/albums newserver.example.com:/tmp/g1/