Database Backup

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
umesh.patil
Posts: 15
Joined: Mon Dec 05, 2011 12:25 am

Database Backup

Post by umesh.patil »

Hi

I want to take database backup(audit trail,alarm viewer,etc), i tried this with USB backup in actions it is working, But I want to save all backup .sdf files in Ftp area i.e. \\project files\\ how to do this. I don't wnat to connect USB to IX panel.

thanks

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Database Backup

Post by mark.monroe »

Hi umesh,

Which version of iX developer are you using? Some versions when you go to the dialog box to setup the save location is it a little different.

You select the same action you would to save the database to a USB drive, but you select the 'project files' radial button.

When you have a 'Database Export' action, press on the button with three dots on it. You can have multiple 'Database Export' actions saving the database files to different locations when a button is clicked.
three dots.png
three dots.png (43.12 KiB) Viewed 10903 times
Then select where you want the file to be saved. In your case, it should be saved to the 'Project Files Folder'.
project_files_backup.png
project_files_backup.png (120.05 KiB) Viewed 10903 times
Then you need to turn on the FTP server on the Panel. On the 'Systems' tab click on the FTP icon circled in red. That brings up a dialog box where you can turn the ftp server on.
ftp.png
ftp.png (167.94 KiB) Viewed 10903 times
You can then FTP to the Panel and browse a directory where your data backs are.
ftp file structure.png
ftp file structure.png (17.13 KiB) Viewed 10903 times
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

umesh.patil
Posts: 15
Joined: Mon Dec 05, 2011 12:25 am

Re: Database Backup

Post by umesh.patil »

Hi Mark,

Thanks for your reply.

I tried whatever you have shown here it is working fine. But I want to BACKUP DATABASE that is ".sdf" file not ".csv" file. Problem is that whenever audit trail is full it will show Audit Trail Memory Full alarm, we need to put USB and take Database Backup. I want to take this backup in to FTP area not in USB. later I will trasfer these files to USB through scripting.

Thanks and Regards
Umesh Patil

User avatar
Ron L.
Posts: 214
Joined: Fri Jul 15, 2011 3:21 pm

Re: Database Backup

Post by Ron L. »

It is possible to write C# script to copy that ".sdf" file, however if any of your DataLoggers are active at the same time, then you might have a problem when you copy the file.

You should be able to find the Database.sdf in the "\FlashDrive\Project\" on the terminal and then you'll copy it to the "\FlashDrive\Project\Project Files" folder.
Best Regards,

Beijer Electronics, Inc.
Ron Lloyd | Applications Engineer

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Database Backup

Post by mark.monroe »

Hi Umesh,

There currently is no way to change the database backup folder. Do you process the backup databases in some way? You could export the data in the audit tail rather than backing up the database and then clear the audit trail.

You will end up with the same data, just in a different format. Do you have some C# code that deletes the audit data in the database?
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply