Help
  • Explore Community Expore Community
  • Get started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Brand Logo
Help
  • Explore Community Explore Community
  • Get started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
close
  • Community Home
  • Forums
    • By Topic
    • By Topic
      EcoStruxure Building
      • Field Devices Forum
      • SmartConnector Forum
      EcoStruxure Power & Grid
      • EcoStruxure Asset Advisor
      • Gateways and Energy Servers
      • Metering & Power Quality
      • Protection & Control
      APC UPS, Critical Power, Cooling and Racks
      • APC UPS Data Center & Enterprise Solutions Forum
      • APC UPS for Home and Office Forum
      EcoStruxure IT
      • EcoStruxure IT forum
      • EcoStruxure IT™ Advisor CFD
      Remote Operations
      • EcoStruxure Geo SCADA Expert Forum
      • Remote Operations Forum
      Industrial Automation
      • Alliance System Integrators Forum
      • AVEVA Plant SCADA Forum
      • CPG Expert Forum DACH
      • EcoStruxure Automation Expert / IEC 61499 Forum
      • Fabrika ve Makina Otomasyonu Çözümleri
      • Harmony Control Customization Forum
      • Industrial Edge Computing Forum
      • Industry Automation and Control Forum
      • Korea Industrial Automation Forum
      • Machine Automation Forum
      • Modicon PAC Forum
      • PLC Club Indonesia
      Schneider Electric Wiser
      • Schneider Electric Wiser Forum
      Power Distribution IEC
      • Eldistribution & Fastighetsautomation
      • Elektrik Tasarım Dağıtım ve Uygulama Çözümleri
      • Paneelbouw & Energie Distributie
      • Power Distribution and Digital
      • Solutions for Motor Management
      Power Distribution NEMA
      • Power Monitoring and Energy Automation NAM
      Power Distribution Software
      • EcoStruxure Power Design Forum
      • LayoutFAST User Group Forum
      Energy & Sustainability Services
      • Green Building Scoring and Certification Forum
      Light and Room Control
      • SpaceLogic C-Bus Forum
      Solutions for your Business
      • Solutions for your Business Forum
      Support
      • Ask the Community
  • Knowledge Center
    • Building Automation Knowledge Base
    • Remote Operations Devices Knowledge Base
    • Geo SCADA Knowledge Base
    • Industrial Automation How-to videos
    • Digital E-books
    • Success Stories Corner
    • EcoStruxure IT Help Center
  • Events & Webinars
    • All Events
    • Innovation Talks
    • Innovation Summit
    • Let's Exchange Series
    • Partner Success
    • Technology Partners
  • Ideas
    • EcoStruxure Building
      • EcoStruxure Building Advisor Ideas
      Remote Operations
      • EcoStruxure Geo SCADA Expert Ideas
      • Remote Operations Devices Ideas
      Industrial Automation
      • Modicon Ideas & new features
  • Blogs
    • By Topic
    • By Topic
      EcoStruxure Power & Grid
      • Backstage Access Resources
      EcoStruxure IT
      • EcoStruxure IT™ Advisor CFD
      Remote Operations
      • Remote Operations Blog
      Industrial Automation
      • Industrie du Futur France
      • Industry 4.0 Blog
      Power Distribution NEMA
      • NEMA Power Foundations Blog
      Energy & Sustainability Services
      • Active Energy Management Blog
      Light and Room Control
      • KNX Blog
      Knowledge Center
      • Digital E-books
      • Geo SCADA Knowledge Base
      • Industrial Automation How-to videos
      • Remote Operations Devices Knowledge Base
      • Success Stories Corner
  • companyImpact

Release the freed-up disk space from Extended Log Storage (PostgreSQL/TimescaleDB) back to Windows.

Building Automation Knowledge Base

Access this self-service resource 24/7 and post your questions or scroll through forums for answers on building automation.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Knowledge Center
  • Building Automation Knowledge Base
  • Release the freed-up disk space from Extended Log Storage (PostgreSQL/TimescaleDB) back to Windows.
Options
  • Article History
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close

Related Forums

  • Field Devices Forum

Previous Next
Contributors
  • RandyDavis
    RandyDavis
  • SangKim
    SangKim

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to Building Automation Knowledge Base
Options
  • Article History
  • Bookmark
  • Subscribe
  • Email to a Friend
  • Printer Friendly Page
  • Report Inappropriate Content
0 Likes
500 Views

Link copied. Please paste this link to share this article on your social media post.

Trying to translate this page to your language?
Select your language from the translate dropdown in the upper right. arrow
Translate to: English
  • (Français) French
  • (Deutsche) German
  • (Italiano) Italian
  • (Português) Portuguese
  • (Русский) Russian
  • (Español) Spanish

Release the freed-up disk space from Extended Log Storage (PostgreSQL/TimescaleDB) back to Windows.

Lieutenant JG SangKim
‎2022-08-23 08:56 AM

on ‎2022-08-23 08:56 AM

Warning

Potential for Data Loss: The steps detailed in the resolution of this article may result in a loss of critical data if not performed properly. Before beginning these steps, make sure all important data is backed up in the event of data loss. If you are unsure or unfamiliar with any complex steps detailed in this article, please contact Product Support for assistance.

Issue

After deleting unnecessary TrendLog objects from EBO and their logged data from the Extended Log Storage (PostgreSQL/TimescaleDB) by selecting the “Clear log” from the System folder (i.e.: Server1/System/Extended Log Storage/TimescaleDB/Trend/Tree View/…”), the Windows still shows the same free disk space size as it was before the deletion.

Product Line

EcoStruxure Building Operation

Environment

  • Building Operation Enterprise Server
  • Building Operation Automation Server
  • External Log Storage
  • PostgreSQL (pgAdmin 4)
  • TimescaleDB 

Cause

PostgreSQL databases require periodic maintenance known as vacuuming for Windows to recover or reuse the freed-up disk space occupied by PostgreSQL/TimescaleDB.

Resolution

There are two variants of VACUUM: standard VACUUM and VACUUM FULL.  VACUUM FULL can reclaim more disk space but runs much more slowly.  VACUUM FULL requires an exclusive lock on the table it is working on, and therefore cannot be done in parallel with other use of the table. Refer to the documentation mentioned at  https://www.postgresql.org/docs/9.5/routine-vacuuming.html  before performing the VACUUM command.

 

Below is an example of the procedure to get the freed-up disk space occupied by PostgreSQL/TimescaleDB back to Windows.

 

1. Back up the current PostgreSQL/TimescaleDB database and save to a safe location.

  1. Backup the “ebo_db” from the PostgreSQL/TimescaleDB server using the pgAdmin 4 (refer to https://www.pgadmin.org/docs/pgadmin4/development/backup_dialog.html , or refer to page 8 “Backup” section of the “EBO External Log Storage Installer.pdf” document for detail).

 

2. Stop the External Log Storage from EBO.

  1. Open the Properties of the TimescaleDB object (/Server/System/External Log Storage/).\
  2. Remember (take a note) the current value settings of the “Host Address” & the “Database Name” attributes.
  3. Change them to the wrong value (or clear them) so that EBO fails to connect to the PostgreSQL/TimescaleDB server.
  4. Repeat the above operation for all the other servers (AS’s) that are enabled/connected to the PostgreSQL/TimescaleDB server.

 

3.Delete the old logs from the PostgreSQL/TimescaleDB database (the “ebo_db”).

  1. Run the pgAdmin 4, select the “ebo_db”, open the “Query Tool”, and execute the below scripts:

  Delete from trend_data where DATE_PART('day', now() - timestamp) > 365

  Delete from event_data where DATE_PART('day', now() - timestamp) > 365

 

4. Vacuum the Database with Full option.

  1. From the same Query Tool on the “ebo_db”, run the below command: Vacuum Full
  2. Wait until it completes (this may take a while depending on the number of old logs that have been deleted from the tables).

 

5. Start the External Log Storage from EBO.

  1. Open the Properties of the TimescaleDB object (/Server/System/External Log Storage/).
  2. Set the value of the “Host Address” & the “Database Name” back to the correct value, so that the EBO server successfully connects to the PostgreSQL/TimescaleDB server.
  3. Verify the EBO server is connected to the PostgreSQL/TimescaleDB server, and it works normally.   
  4. Repeat the above operations for all the other EBO servers (AS’s) that were disabled/disconnected from the PostgreSQL/TimescaleDB server.

 

Labels (1)
Labels:
  • EcoStruxure Building Operation
Tags (3)
  • Find more articles tagged with:
  • external
  • SangKim22
  • storage
Was this article helpful? Yes No
No ratings

Link copied. Please paste this link to share this article on your social media post.

To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this forum after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the forum - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2023 Schneider Electric, Inc