Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Weiteres / Allgemeines findet sich unter OwnCloud / nextCloud

 

Convert from SQLite to PostgreSQL

 

# su - postgres
$ createuser -P owncloud
$ createdb -O owncloud -E UNICODE ownclouddb

 createdb: database creation failed: ERROR:  new encoding (UTF8) is 
incompatible with the encoding of the template database (SQL_ASCII)
 HINT:  Use the same encoding as in the template database, or use template0 as template.

deswegen nutzen wir dann das andere Template:

$ createdb -O owncloud -E UNICODE ownclouddb -T template0
# sudo -u www-data php /var/www/owncloud/occ db:convert-type --all-apps pgsql owncloud 127.0.0.1 ownclouddb

 

Vorsichtshalber:
/srv/owncloud/data # mv owncloud.db owncloud.db.backup_pgMig

 

What it looks like:
What is the database password?
Creating schema in new database
The following tables will not be converted:
 oc_bookmarks
 oc_bookmarks_tags
 oc_clndr_calendars
 oc_clndr_objects
 oc_clndr_repeat
 oc_clndr_share_calendar
 oc_clndr_share_event
 oc_contacts_addressbooks
 oc_contacts_cards
 oc_contacts_cards_properties
 oc_documents_invite
 oc_documents_member
 oc_documents_op
 oc_documents_revisions
 oc_documents_session
 oc_files_antivirus
 oc_fscache
 oc_gallery_sharing
 oc_lucene_status
 oc_media_albums
 oc_media_artists
 oc_media_sessions
 oc_media_songs
 oc_media_users
 oc_permissions
 oc_pictures_images_cache
 oc_queuedtasks
 oc_shorty
Continue with the conversion (y/n)? [n] y
 oc_appconfig
  161/161 [============================] 100%
 oc_storages
  9/9 [============================] 100%
 oc_file_map
  0/0 [============================]   0%
 oc_mimetypes
  92/92 [============================] 100%
 oc_filecache
  14898/14898 [============================] 100%
 oc_group_user
  1/1 [============================] 100%
 oc_group_admin
  0/0 [============================]   0%
 oc_groups
  1/1 [============================] 100%
 oc_locks
  0/0 [============================]   0%
 oc_preferences
  30/30 [============================] 100%
 oc_properties
  1445/1445 [============================] 100%
 oc_share
  23/23 [============================] 100%
 oc_jobs
  4/4 [============================] 100%
 oc_users
  5/5 [============================] 100%
 oc_vcategory
  19/19 [============================] 100%
 oc_vcategory_to_object
   0/0 [============================]   0%
 oc_privatedata
   0/0 [============================]   0%
 oc_share_external
   0/0 [============================]   0%
 oc_activity
  3209/3209 [============================] 100%
 oc_activity_mq
     0/0 [============================]   0%
 oc_files_trash


 72/72 [============================] 100%

Troubleshooting invalid duplicate storage

 

Find Storage references:
1. find files in cache: storageid 8 == new home::marcel

 

select old.fileid,new.fileid,old.path_hash,new.path_hash,old.name from oc_filecache  old inner join oc_filecache as new on ( new.storage=8 and old.path_hash = new.path_hash AND old.storage != new.storage);
delete from oc_filecache where fileid in (select old.fileid from oc_filecache old inner join oc_filecache as new on ( new.storage=8 and old.path_hash = new.path_hash AND old.storage != new.storage));
  • Keine Stichwörter