# Accessing Database

**URL:** <https://meta.discourse.org/t/accessing-database/154125>\
**Category:** Self-hosting\
**Created:** [June 7, 2020, 10:40pm UTC](https://meta.discourse.org/t/accessing-database/154125 "2020-06-07T22:40:54Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)\
**Post date:** [January 23, 2025, 10:47am UTC](https://meta.discourse.org/t/accessing-database/154125/9 "2025-01-23T10:47:09Z")

</div>

> [@gassim](#):
>
> It says that everything was successful but when I ‘view data’ in the tables, they are empty.

Just redid this to check.

1. Using the admin page https://\<site\>/admin/backup requested a download and followed the steps, there were several steps which included verification through an email and downloading a file.
2. The file downloaded was a `gz` file e.g. `abc-2025-01-23-095947-v20250122131007.sql.gz`. On Windows uncompressed the file using [7-zip](https://www.7-zip.org/) which created a directory with the same name less the `.gz` on the end.

```plaintext
C:\Users\Groot\Downloads>dir *.sql.gz
01/23/2025 05:04 AM 407,213,170 abc-2025-01-23-095947-v20250122131007.sql.gz

C:\Users\Groot\Downloads>dir *.sql

01/23/2025 05:04 AM <DIR> abc-2025-01-23-095947-v20250122131007.sql

```

1. Using a Windows command prompt opened to the directory with the sql file to verify the sql file exist

```plaintext
C:\Users\Groot\Downloads\abc-2025-01-23-095947-v20250122131007.sql>dir

01/23/2025 05:04 AM 1,572,346,154 abc-2025-01-23-095947-v20250122131007.sql
               1 File(s) 1,572,346,154 bytes

```

1. Using same Windows command prompt used type command to list the start of the sql file.

> type \<file\> /a | more

```plaintext
C:\Users\Groot\Downloads\abc-2025-01-23-095947-v20250122131007.sql>type "abc-2025-01-23-095947-v20250122131007.sql" /a | more

abc-2025-01-23-095947-v20250122131007.sql

--
-- PostgreSQL database dump
--

-- Dumped from database version 15.8 (Debian 15.8-1.pgdg110+1)
-- Dumped by pg_dump version 15.10 (Debian 15.10-1.pgdg120+1)

-- Started on 2025-01-23 09:59:47 UTC

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';

```

Hopefully this gets you to the point that you can use the SQL file with PGAdmin to import the data.

* * *

NB

When I [posted](https://meta.discourse.org/t/accessing-database/154125/2) about this ~5 years ago, the file downloaded file type was `tar.gz` it is now `sql.gz`. The only difference is that now one less uncompressession step is needed.

---

_[View the full topic](https://meta.discourse.org/t/accessing-database/154125)._
