Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Realm Works Forums > Realm Works Discussion

Notices

Reply
 
Thread Tools Display Modes
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 25th, 2017, 10:17 AM
I have a Realm, let's call it "Realm X", where I wanted to try something that we'll arbitrarily call "clever". *ahem* *cough*

Step 1: Run a backup.
Step 2: Make a copy of Realm X.

I did both of those things in that order. Then I did a full export of Realm X.

Now here's the "clever" bit. (Sometimes there's a fine line between "clever" and "stupid", right?) I opened the the export as an XML file and made a manual edit. Specifically, I removed the cover art. I did this by deleting everything between <cover_art> and </cover_art>. I left those two tags untouched, but deleted everything between them.

I saved that, went back to Realm Works, and deleted Realm X. I recreated Realm X and tried to import the edited .rwexport file. It failed.

It was worth a shot, but since it failed, I figured I'd just restore my database, and all will be well.

So I run the restore, and I get no errors. But when I check my realms, Realm X is still empty. My original data (which was there when I made the backup) is gone.

I thought that maybe since there's a realm there with the same name as the one I want restored, it's getting confused. So I delete the ream, and run another restore. Realm X is not there.

However, the copy I made earlier (after the backup) IS there.

Generally speaking, my understanding of backup and restore is that when you backup a database, it backs up everything that's there. And when you do a restore, it restores your database to the exact same state as when you made the backup, meaning not only that all the data you had is restored, but also that any new data that was created after the backup is now lost.

Again, the restore should put the database in the exact same state as it was in at the moment of the backup.

Obviously, in this case, either I did something wrong, or the backup/restore process for Realm Works works differently than a traditional database backup.

Can anyone offer any insights?
EightBitz is offline   #1 Reply With Quote
davidp
Senior Member
Lone Wolf Staff
 
Join Date: Jun 2011
Posts: 1,090

Old January 25th, 2017, 10:35 AM
Quote:
Originally Posted by EightBitz View Post
I have a Realm, let's call it "Realm X", where I wanted to try something that we'll arbitrarily call "clever". *ahem* *cough*

Step 1: Run a backup.
Step 2: Make a copy of Realm X.

I did both of those things in that order. Then I did a full export of Realm X.

Now here's the "clever" bit. (Sometimes there's a fine line between "clever" and "stupid", right?) I opened the the export as an XML file and made a manual edit. Specifically, I removed the cover art. I did this by deleting everything between <cover_art> and </cover_art>. I left those two tags untouched, but deleted everything between them.

I saved that, went back to Realm Works, and deleted Realm X. I recreated Realm X and tried to import the edited .rwexport file. It failed.

It was worth a shot, but since it failed, I figured I'd just restore my database, and all will be well.

So I run the restore, and I get no errors. But when I check my realms, Realm X is still empty. My original data (which was there when I made the backup) is gone.

I thought that maybe since there's a realm there with the same name as the one I want restored, it's getting confused. So I delete the ream, and run another restore. Realm X is not there.

However, the copy I made earlier (after the backup) IS there.

Generally speaking, my understanding of backup and restore is that when you backup a database, it backs up everything that's there. And when you do a restore, it restores your database to the exact same state as when you made the backup, meaning not only that all the data you had is restored, but also that any new data that was created after the backup is now lost.

Again, the restore should put the database in the exact same state as it was in at the moment of the backup.

Obviously, in this case, either I did something wrong, or the backup/restore process for Realm Works works differently than a traditional database backup.

Can anyone offer any insights?
When you delete a realm, it is permanent as the server is involved in the deletion and has it as deleted. Doing the restore still leaves the realm deleted from the server's perspective so it gets marked as deleted within the restored database.

This is why we have the big huge warning about deleting a realm is permanent.
davidp is offline   #2 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old January 25th, 2017, 10:43 AM
Quote:
Originally Posted by davidp View Post
When you delete a realm, it is permanent as the server is involved in the deletion and has it as deleted. Doing the restore still leaves the realm deleted from the server's perspective so it gets marked as deleted within the restored database.

This is why we have the big huge warning about deleting a realm is permanent.
Well yeah, but there's permanent, and then there's permanent. :-) A lot of programs have warnings that deleting data is permanent, but if you do a restore, the data comes back.

Anyway, not complaining. Now that I know, I know.

And that, I'm assuming, is the same reason that the restore process doesn't delete realms that were there prior to the backup? So backup and restore just applies to content within realms?

And in that context, does it just restore content that was deleted, or does it also remove content that wasn't there in the backup?
EightBitz is offline   #3 Reply With Quote
MaxSupernova
Senior Member
 
Join Date: Mar 2014
Posts: 411

Old January 25th, 2017, 10:47 AM
So you can't restore a deleted realm from a backup file?

That seems like an interesting design decision, warning or not.

Kind of a new spin on the concept of "backup".
MaxSupernova is offline   #4 Reply With Quote
davidp
Senior Member
Lone Wolf Staff
 
Join Date: Jun 2011
Posts: 1,090

Old January 25th, 2017, 10:57 AM
It gets extremely gnarly if deleted realms came back with a restore when dealing also with offline usage and the server. There are cases where it can cause very bad things to happen if we allowed it.
davidp is offline   #5 Reply With Quote
Strategon
Member
 
Join Date: Dec 2013
Posts: 39

Old January 25th, 2017, 10:57 AM
Quote:
Originally Posted by MaxSupernova View Post
So you can't restore a deleted realm from a backup file?

That seems like an interesting design decision, warning or not.

Kind of a new spin on the concept of "backup".
That's similar to Obsidian Portal: You can make a backup of your campaign, you just can't use it to restore a campaign.


What happens if you don't delete said realm? If you restore the back up it overwrites the new one? Instead of delete, copy realm and rename it, then try restoring?
Strategon is offline   #6 Reply With Quote
Acenoid
Senior Member
 
Join Date: Dec 2013
Posts: 798

Old January 25th, 2017, 12:07 PM
Maybe there should be the option upon restore to generate a new "server" realm?

Join the (unofficial) Realm-Works IRC Chat: #realm-works on the Rizon Network (https://wiki.rizon.net/index.php?title=Servers)
-> Browser Client: https://kiwiirc.com/client/irc.rizon.net
Acenoid is offline   #7 Reply With Quote
kbs666
Senior Member
 
Join Date: Oct 2014
Location: Chicago, IL
Posts: 1,690

Old January 25th, 2017, 12:28 PM
Can't help you now but when you are experimenting like this, don't sync to the server, no matter what you've done unless you are 100% sure you want the change to be permanent.

my Realm Works videos
https://www.youtube.com/channel/UCZU...4DwXXkvmBXQ9Yw
kbs666 is offline   #8 Reply With Quote
Bidmaron
Senior Member
 
Join Date: Dec 2010
Posts: 468

Old January 25th, 2017, 12:52 PM
If that is the case, when you delete a realm and you detect a backup has been made, I recommend that you warn the user that his backup will be worthless. This is not how most folks will think about how a backup works.
Bidmaron is offline   #9 Reply With Quote
davidp
Senior Member
Lone Wolf Staff
 
Join Date: Jun 2011
Posts: 1,090

Old January 25th, 2017, 02:37 PM
Quote:
Originally Posted by Bidmaron View Post
If that is the case, when you delete a realm and you detect a backup has been made, I recommend that you warn the user that his backup will be worthless. This is not how most folks will think about how a backup works.
We have the message right now when you delete a realm that includes this text:

Quote:
It will no longer be syncable and cannot be recovered via backup.
davidp is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:07 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.