restore deleted app

Confluence User - 26 Oct, 2016

I accidentally deleted my only version of app from versioning page, it seems most of the data is still on the database. Is there a way to restore the app, its forms userviews etc. or I have to design it from scratch and connect forms to existing tables?

 

note: I don't have a backup of the exported app definition file.

apps

7


26 Oct, 2016
confluenceUser
confluenceUser

Do you have a database backup?

If you restore the database, you should have your app forms and processes back as of when the backup was made.

Otherwise I can't think of any other way...

PS:

If you are using Windows and MySQL as your development environment, creating a .bat file with the content below will make backing up your database very easy. You can schedule it via the Windows Task Scheduler.

@echo off
tasklist /FI "IMAGENAME eq mysqld.exe" 2>NUL | find /I /N "mysqld.exe">NUL
if "%ERRORLEVEL%"=="0" (
    goto continue
) else (
    goto mysql_not_running
)
:continue		
 set dbUser=YOUR DB USER
 set dbPassword=YOUR DB PASSWORD
 set backupDir="C:\YOUR PATH\Joget Database Backup"
 set mysqldump="C:\YOUR PATH TO MYSQL\mysql\bin\mysqldump.exe"
 set mysqlDataDir="C:\YOUR PATH TO MYSQL\mysql\data"
 set zip="C:\YOUR PAH TO 7z\7za.exe"
 :: get date
 for /F "tokens=2-4 delims=/ " %%i in ('date /t') do (
      set yy=%%i
      set mon=%%j
      set dd=%%k
 )
 :: get time
 for /F "tokens=5-8 delims=:. " %%i in ('echo^| time ^| find "current" ') do (
      set hh=%%i
      set min=%%j
 )
set hr=%time:~0,2%
set hr=%hr: =0%
 set dirName=%mon%-%yy%-%dd%_%hr%-%min%
  
 :: switch to the "data" folder
 pushd %mysqlDataDir%
 :: iterate over the folder structure in the "data" folder to get the databases
 for /d %%f in (*) do (
 if not exist %backupDir%\%dirName%\ (
      mkdir %backupDir%\%dirName%
 )
 echo -----------------------------
 echo * MySQL backup are starting *
 echo -----------------------------
 echo Current backup : %%f.sql
 %mysqldump% --host="localhost" --user=%dbUser% --password=%dbPassword% --single-transaction --add-drop-table --databases %%f > %backupDir%\%dirName%\%%f.sql
 %zip% a -tgzip %backupDir%\%dirName%\%%f.sql.gz %backupDir%\%dirName%\%%f.sql
 echo[
 echo Done compress and archive thus file..now lets delete SQL file...
 del %backupDir%\%dirName%\%%f.sql
 echo OK, now I need to take a breather for 3 seconds...
 choice /d y /t 3 > nul
 cls
 )
 popd
 echo -----------------------------
 echo + MySQL backup are finished +
 echo -----------------------------
 pause
 exit
:mysql_not_running
echo -----------------------------
echo !!WARNING COULDN'T CONTINUE!!
echo -----------------------------
echo Message: mysqld.exe is not running, please start it (e.g. via xampp-control)
pause
exit
26 Oct, 2016
confluenceUser
confluenceUser

I don't have a db backup... Does the exported app definition file contain form definitions etc? Maybe I can put it under source control (github)

26 Oct, 2016
confluenceUser
confluenceUser

yes it does - it has literally everything that you can see in the designer. Only the individual process data under app_fd in the db are not included (ie. actual executed processes)

26 Oct, 2016
confluenceUser
confluenceUser

oh and except plugins

26 Oct, 2016
confluenceUser
confluenceUser

So I can use that exported *.jwa file to deploy/update my app from development machine, to production server?

26 Oct, 2016
confluenceUser
confluenceUser

yes you can - but you need to make sure that the plugins you use are the same. see: https://dev.joget.org/community/questions/25592684/export-app-including-all-plugins-that-are-being-used

26 Oct, 2016
confluenceUser
confluenceUser

ok. thanks for sparing time to answer my many questions :)

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print