GMDprivateServer
GMDprivateServer copied to clipboard
Is there a way to recover deleted levels?
So, last night, I made a small error in the servers that resulted in the deletion of more than 500 levels. (I won't go into detail about how I did it because it is so embarrassing.)
I started by looking for a backup sql file, which I did. however, it informs me that the table "acccomments" already exists anytime I import that. (#1050 - Table 'acccomments' already exists
)
Someone advised me to look in my ftp's levels folder (.../data/levels
), where the deleted levels may still be found. But can you use these files to restore the levels?
I would be grateful if someone could assist me with level restoration.
@TAL9988 Both ways gonna work for you.
If you want to restore levels by the SQL backup, you must edit it before so you don't get errors: instead of CREATE TABLE write CREATE TABLE IF NOT EXISTS.
But if you want to restore them by ftp's data - theoretically - you can, because basic level info is saved & encrypted here, but it would be hard for you to decode & re-upload to database 500+ levels. Only if you make a bot or smth that would do it all instead of you...
So it's better to edit SQL backup.
Ok so I tried your SQL method. I edited the sql file and edited the "CREATE TABLE" to "CREATE TABLE IF NOT EXISTS".
I tried and it got me with this error -> #1062 - Duplicate entry '2' for key 'PRIMARY'
Any idea what did I do wrong here?
So, you want to recover only levels? You deleted levels only in SQL?
Ok so I tried your SQL method. I edited the sql file and edited the "CREATE TABLE" to "CREATE TABLE IF NOT EXISTS".
I tried and it got me with this error ->
#1062 - Duplicate entry '2' for key 'PRIMARY'
Any idea what did I do wrong here?
it means that it's trying to create something with the ID 2 (the error didn't specify the table so that's up to you to figure out) but you already have something else with the ID 2 in the database
bro even cvolton commented 💀