22
Views
10
Comments
Solved
How to export or backup Database from On-Premise Installation or Cloud (if possible)

Hi, 
I have many researching about "how to backup or export database as a File Using Timer from OutSystems",
occurred my goal is not possible in Cloud Environment but possible in On-Premise.

However, I can't find any reference documentation links or any answers in Forum for "how do I export or backup Database as a File Using Timer in On-Premise Installation Of OutSystems".

I apologize if my English sentence was not polite,
Please help me.

2019-01-07 16-04-16
Siya
 
MVP
Solution

If its on premise and if you have the right permission you can indeed use the FileSystems extension for writing to local path or to a mapped remote network path.

2019-01-07 16-04-16
Siya
 
MVP

@Moe Kyaw Swar :  OutSystems "database" is simply a regular database engine ( SQL Server  or  Oracle) that you manage yourself (for On-Premise). 

Therefore, backing up or exporting the OutSystems database as a file must be done using the database vendor’s native tools (for example, SQL Server Management Studio or Oracle backup utilities), and not via Service Studio or LifeTime.

OutSystems itself recommends using database backup and restore (database clone) for scenarios such as environment migration or cloning, as described in the official documentation at https://success.outsystems.com/documentation/11/managing_outsystems_platform_and_application_lifecycle/migrate_an_environment_using_a_database_clone

UserImage.jpg
Moe Kyaw Swar

@Siya : Firstly thank you so much for your answering.
I am now reading for your recommend reference link and I have updated my question for " my goal is to use with Timer".


If you don't mind, Please can you tell me "My goal is possible to export database with Timer".


Thank you so mush for your continuous supporting and I will now read by taking care to your recommand link.

2019-01-07 16-04-16
Siya
 
MVP

It is possible to take backup directly inside SQL Server or Oracle at regular intervals Eg: this is how you can manage in SQL Server using Management Studio,


btw please let me know if your use case is different.

UserImage.jpg
Moe Kyaw Swar

@Siya : I am really thank you so much for your patient and continuous supporting!

Let me fix my use case question "Can I export OutSystems Database as File(records from multiple tables) using Timer into local folder or Local File Server Folder".

So I am thinking (can wrong I am in junior Level Developer) My Use Case is need to do in "Service Center" or "Service Studio".
According to your recommand link, I think my goal is sure not possible in 'Service Studio' but can it be possible to develop function using the Timer of OutSystems in "Service Center"?
Please remember me I am in Junior Developer so my thinkings can be in wrong.


Again Really Thank You For your patient and continuous support!

2019-01-07 16-04-16
Siya
 
MVP

@Moe Kyaw Swar : Let me restate your use case to ensure my understanding is correct.
Suppose you have an application containing  ten entities, and you would like to export data from all of these entities ( or selected entities) in JSON / CSV format and download the output as a single file or to upload to some location in a particular interval.

Please confirm whether this accurately reflects your requirement.

UserImage.jpg
Moe Kyaw Swar

@Siya : Firstly apologize if my question is complex.

Short confirmation for requirement is 'Yes' : In this case I am confusing terms: Is this case 'Data Export' or 'Database Export'.

The requirement is "Export records from multiple tables into local folder as a Text File using Timer".
If you don't mind, Please help for this state.
I am really confusing for this state, how can I call this as "Data export" or "Database Export".




2019-01-07 16-04-16
Siya
 
MVP

@Moe Kyaw Swar : Thanks for confirming the requirement. You may call it as Data Export.

As a first step you need to extract the data on the server side. This can be done using an aggregate which fetches the data and using 'Record List to Excel' you can export to Excel.

Or you can have an advanced Query like below which returns a JSON directly from the database 

SELECT * FROM {Employee} FOR JSON PATH, INCLUDE_NULL_VALUES

Now you have the data. Normally you don't have access to the Platform Servers file system. If you have access to file system, you can use FileSystem forge component to write the content (https://www.outsystems.com/forge/component-overview/68/filesystem-o11)

What I suggest is experiment with the above two methods choose what works for you. I leave it to other community members for their suggestion too. 


UserImage.jpg
Moe Kyaw Swar

Hello @Siya : Thank you for your patient, solutions and continuous supporting!


Now I am using Cloude Environment so I can't use 'File System' Extension to export to local path,
But if I used On-Premise, is it possible to use 'FileSystems' extenstion (include file path argument) using 'File Write Text' Action to export my local path?

Thank you for your patient.

2019-01-07 16-04-16
Siya
 
MVP
Solution

If its on premise and if you have the right permission you can indeed use the FileSystems extension for writing to local path or to a mapped remote network path.

UserImage.jpg
Moe Kyaw Swar

@Siya : Thank you so much for your patient!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.