The day was crazy, but I’ll try to explain how I fixed everything if anyone has reaaaally bad luck like me
-
Download the backup. And extract a few time until you have the
dump.sql
file -
Edit the dump.sql with a software like vim download : vim online
-
I suck so bad to sql. To find the right table, I searched
username_lower,
. It pointed me to the users table, then I researched “lea”. I edited the two Lea entries. It was probably way easier. But remember, I suck at sql, especially when they are 1.5gb. Save the file. -
I gzip the dump.sql with 7zip. You should have a new file named :
dump.sql.gz
-
Create a new folder in
/var/discourse/shared/standalone/backups/default/
I used test -
If you have a good internet connection, upload the
uploads
folder you obtained when you decompressed your backup file, put the folder in/var/discourse/shared/standalone/backups/default/test/
6.1 If you don’t have a good connection like me, you have to use your server note the name of your backup file and use this commandtar xvzf /var/discourse/shared/standalone/backups/default/yourbackupfile.tar.gz -C /var/discourse/shared/standalone/backups/default/test
6.2 In the test folder, you’ll have a dump.sql.gz file and uploads folder. It’s good. -
Upload the dump.sql.gz file in your test folder to replace the broken dump.sql.gz
-
In your server : go to
cd /var/discourse/shared/standalone/backups/default/test
-
You need to remake your backup file, you have to use the exact name of the older backup file :
tar -czvf yourbackupfile.tar.gz uploads/ dump.sql.gz
-
In your ftp go to
/var/discourse/shared/standalone/backups/default/
, delete the broken backup or move in to another folder -
Move the new backup file in /var/discourse/shared/standalone/backups/default/
-
Restore the backup. I prefer to use this method, and if you got there, you should be able to use it easily : Restore a backup from command line
The backup should succeed
Easy.