mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 02:34:52 +00:00
convert nextcloud db from mysql to postgres
This commit is contained in:
parent
a5ec39cd2a
commit
8babcf342b
@ -63,3 +63,20 @@ Use this mysqldump command:
|
||||
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
|
||||
```
|
||||
|
||||
## Converting to Postgres
|
||||
|
||||
Same as MySQL, but run this command instead:
|
||||
|
||||
```
|
||||
sudo -u nextcloud nextcloud-occ db:convert-type pgsql nextcloud /run/postgresql/ nextcloud
|
||||
```
|
||||
|
||||
Then set the `dbtype` to `pgsql`.
|
||||
|
||||
## Backing Up Postgres Database
|
||||
|
||||
Use this pg_dump command:
|
||||
|
||||
```
|
||||
sudo -u nextcloud pg_dump nextcloud > backup.sql
|
||||
```
|
||||
|
@ -12,13 +12,14 @@
|
||||
maxUploadSize = "50G";
|
||||
config = {
|
||||
adminpassFile = config.secrets.nextcloud.dest;
|
||||
dbtype = "mysql";
|
||||
dbtype = "pgsql";
|
||||
};
|
||||
settings = {
|
||||
default_phone_region = "US";
|
||||
# Allow access when hitting either of these hosts or IPs
|
||||
trusted_domains = [ config.hostnames.content ];
|
||||
trusted_proxies = [ "127.0.0.1" ];
|
||||
maintenance_window_start = 4; # Run jobs at 4am UTC
|
||||
};
|
||||
extraAppsEnable = true;
|
||||
extraApps = with config.services.nextcloud.package.packages.apps; {
|
||||
|
Loading…
Reference in New Issue
Block a user