undelete problem
-
Andreas Flack
undelete problem
Thu March 13 2008 18:45:02 UTCHi!
While playing with the new delete function, I accidentally deleted one
object tree too many (my root page. Ouch). When I try to undelete it
(with Asgard's undelete function), Midgard (mgd_errstr, that is) tells
me that this cannot be done because "Requested object is not deleted".
When I look in the database, I can see that metadata_deleted is set to 1
for the object in question. Is that a general problem or does it have
something to do with my DB?
Bye,
Andreas
P.S.: This is Midgard 1.8.7 running on Debian Stable x86
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Piotr Pokora
Re: [midgard-user] undelete problem
Thu March 13 2008 19:10:25 UTCAndreas Flack writes:
Hi!
> While playing with the new delete function, I accidentally deleted one
> object tree too many (my root page. Ouch). When I try to undelete it
> (with Asgard's undelete function), Midgard (mgd_errstr, that is) tells
> me that this cannot be done because "Requested object is not deleted".
> When I look in the database, I can see that metadata_deleted is set to 1
> for the object in question. Is that a general problem or does it have
> something to do with my DB?
It's stored in repligard table:
SELECT typename, object_action FROM repligard WHERE guid=$guid;
1 = DELETE
2 = PURGE
3 = CREATE
4 = UPDATE
Piotras
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Re: [midgard-user] undelete problem
Thu March 13 2008 19:55:06 UTCPiotr Pokora schrieb:
> Andreas Flack writes:
>
> Hi!
>
>> While playing with the new delete function, I accidentally deleted one
>> object tree too many (my root page. Ouch). When I try to undelete it
>> (with Asgard's undelete function), Midgard (mgd_errstr, that is) tells
>> me that this cannot be done because "Requested object is not deleted".
>> When I look in the database, I can see that metadata_deleted is set to 1
>> for the object in question. Is that a general problem or does it have
>> something to do with my DB?
>
> It's stored in repligard table:
>
> SELECT typename, object_action FROM repligard WHERE guid=$guid;
>
> 1 = DELETE
> 2 = PURGE
> 3 = CREATE
> 4 = UPDATE
I just deleted one style element and looked up the entry in the
repligard table. In the field object_action, I see a value of 0, which
is bad, I guess.
I tried the same on a different database on the same server (Mgd 1.8.7,
Debian Stable x86), and there, the problem also occurs. I also tried on
a different server (Mgd 1.8.7, Debian Testing AMD64), and there, it
worked like it should. One difference between the two servers is that on
the machine where it isn't working, the databases are quite old, IIRC
they were first created with Midgard 1.4. On the one where it is
working, the database was created with 1.7 or 1.8.
Bye,
Andreas
>
> Piotras
> _______________________________________________
> user mailing list
> user@lists.midgard-project.org
> http://lists.midgard-project.org/mailman/listinfo/user
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Piotr Pokora
Re: [midgard-user] undelete problem
Thu March 13 2008 20:10:16 UTCAndreas Flack writes:
> I tried the same on a different database on the same server (Mgd 1.8.7,
> Debian Stable x86), and there, the problem also occurs. I also tried on
> a different server (Mgd 1.8.7, Debian Testing AMD64), and there, it
> worked like it should. One difference between the two servers is that on
> the machine where it isn't working, the databases are quite old, IIRC
> they were first created with Midgard 1.4. On the one where it is
> working, the database was created with 1.7 or 1.8.
I think that problem might be the fact *when* object has been created.
Database itself shouldn't be an issue as table layout matters.
Can you check object's creation datetime? It's metadata_created column
in object's defined table.
Piotras
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Re: [midgard-user] undelete problem
Thu March 13 2008 20:55:03 UTCPiotr Pokora schrieb:
> Andreas Flack writes:
>
>> I tried the same on a different database on the same server (Mgd 1.8.7,
>> Debian Stable x86), and there, the problem also occurs. I also tried on
>> a different server (Mgd 1.8.7, Debian Testing AMD64), and there, it
>> worked like it should. One difference between the two servers is that on
>> the machine where it isn't working, the databases are quite old, IIRC
>> they were first created with Midgard 1.4. On the one where it is
>> working, the database was created with 1.7 or 1.8.
>
> I think that problem might be the fact *when* object has been created.
> Database itself shouldn't be an issue as table layout matters.
> Can you check object's creation datetime? It's metadata_created column
> in object's defined table.
The oldest article I have in the database is from 2004-03-15 16:15:24
(assuming the timestamp is correct). This one could be undeleted
successfully. I also tried a snippetdir where metadata_created is set to
0000-00-00 00:00:00 (for reasons unknown, but it is like that with all
the snippetdirs in this db) and there, undeletion fails.
Bye,
Andreas
>
> Piotras
> _______________________________________________
> user mailing list
> user@lists.midgard-project.org
> http://lists.midgard-project.org/mailman/listinfo/user
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Piotr Pokora
Re: [midgard-user] undelete problem
Thu March 13 2008 21:10:08 UTCAndreas Flack writes:
> The oldest article I have in the database is from 2004-03-15 16:15:24
> (assuming the timestamp is correct). This one could be undeleted
> successfully. I also tried a snippetdir where metadata_created is set to
> 0000-00-00 00:00:00 (for reasons unknown, but it is like that with all
> the snippetdirs in this db) and there, undeletion fails.
I think these were created before metadata and undelete has been introduced.
Piotras
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Re: [midgard-user] undelete problem
Thu March 13 2008 21:10:11 UTCPiotr Pokora schrieb:
> Andreas Flack writes:
>
>> The oldest article I have in the database is from 2004-03-15 16:15:24
>> (assuming the timestamp is correct). This one could be undeleted
>> successfully. I also tried a snippetdir where metadata_created is set to
>> 0000-00-00 00:00:00 (for reasons unknown, but it is like that with all
>> the snippetdirs in this db) and there, undeletion fails.
>
> I think these were created before metadata and undelete has been introduced.
So that means I cannot undelete them, I guess. Do you think there could
be other problems with objects like this? I'm thinking especially about
replication, because some contents of this site always had problems when
replicating with Exorcist. Or is there maybe even a way to correct this?
Like, I don't know, dumping everything to disk with replicator and
importing it into a fresh database?
Bye,
Andreas
>
> Piotras
> _______________________________________________
> user mailing list
> user@lists.midgard-project.org
> http://lists.midgard-project.org/mailman/listinfo/user
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user -
Piotr Pokora
Re: [midgard-user] undelete problem
Thu March 13 2008 21:30:02 UTCAndreas Flack writes:
>>> The oldest article I have in the database is from 2004-03-15 16:15:24
>>> (assuming the timestamp is correct). This one could be undeleted
>>> successfully. I also tried a snippetdir where metadata_created is set to
>>> 0000-00-00 00:00:00 (for reasons unknown, but it is like that with all
>>> the snippetdirs in this db) and there, undeletion fails.
>>
>> I think these were created before metadata and undelete has been
>> introduced.
>
> So that means I cannot undelete them, I guess. Do you think there could
> be other problems with objects like this? I'm thinking especially about
> replication,
I had problems with database like this and good solution ( at least for
replication ) has been this simple SQL update:
UPDATE tablename SET metadata_revised = '1970-01-01 00:00:00' where
metadata_revised = '0000-00-00 00:00:00';
Point is, not to have 0000-00-00 datetimes, so you may tweak date.
Piotras
_______________________________________________
user mailing list
user@lists.midgard-project.org
http://lists.midgard-project.org/mailman/listinfo/user
