Hi
I want to migrate all my server data centos7 OS to ubuntu, is anything that could be problem?
No, thatās pretty straightforward.
Do a pg_dump
to backup your database, copy the /opt/indico/archive
folder and possibly your /opt/indico/etc/indico.conf
and /opt/indico/logs/
(if you want to keep that) as well.
Then on the new system you follow the installation guide but after creating the database you pg_restore
it and DO NOT run indico db prepare
(nor indico setup wizard
, unless you want to regenerate your indico.conf which is probably faster than copying it if you didnāt customize anything in there).
thanks for reply
Iād made backup.sql file by pg_dump, then I wan to use pg_restore with my sql file, but dont know how.
And should I copy archive, etc and logs directory before excute pg_restore or later?
Also, I understand excute command systemctl restart
for launch Indico without indico db prepare
is that right?
It would be easier to help you if you showed the exact pg_dump
command you used (it can output dumps in different formats, and depending on the format restoring them requires different commands).
Also, I understand excute command
systemctl restart
for launch Indico withoutindico db prepare
is that right?
systemctl restart
is not a complete command. But you are right that you must not run indico db prepare
- you restore your DB dump instead.
Only know that my predecessor use
pg_dump
command in the centOS, and not be able to know exact options he used.(he said he donāt remember but might he used it only in basic way)
he left backup.sql
file and directory which is /archive/
, /etc/
and others under /opt/indico/
.
I finished all steps before ā6.Configuring Indicoā at Apache ā Indico 3.3.3 documentation which is indico setup wizard
in the Ubuntu 22 LTS.
I even want to know should I use pg_restore before use indico setup wizard
command.
Can you post the first 20 lines of the backup.sql file? Easiest way to get them is running this command: head -n 20 backup.sql
I even want to know should I use pg_restore before use
indico setup wizard
command.
Doesnāt matter. The database is not accessed at that point besides testing whether it exists (but you should have already created the database itself using the createdb
command from the setup guide anyway, so thatāll be fine)
here is backup.sqlās
--
-- PostgreSQL database dump
--
-- Dumped from database version 13.15
-- Dumped by pg_dump version 13.15
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: attachments; Type: SCHEMA; Schema: -; Owner: indico
also there is the way to use this backup file to nginx? The backup files were generated from apache.
psql indico -f backup.sql
should work. Errors regarding ownership can be ignored (since youāll execute it as the indico
user no explicit ownership changes are needed/possible).
And yes, it will work regardless of infrastructure choices such as apache vs nginx or the operation system.
Thanks for your helps a lot.
There are some things to check,
so is it ok to use psql indico -f backup.sql
after using command indico setup wizard
?
And I was thinking I should use chown -R /opt/indico indico
(the backup directories) for indico(the account by useadd
) about ownership problem isnt that right?
Yes, you can run it at any time.
And yes, all the folders inside /opt/indico
should be owned by the Indico user. Generally it is a good idea to preserve permissions when backing up and restoring filesā¦ For the directories you can check the chmod
commands from the setup guide.
Also, Shoul I excute psql indico -f backup.sql
under indico account? or root?
Thanks again.
Run it as the indico user.
Iāve done all steps above, and there were no errors.
but thereās a problem like this:
after using comman
pspl
,I coppied
archive/
, cahce/
, log/
, logs/
and ātmp/ā to the new /opt/indico
.and I did not copy
etc
and web
(etc
has same contents already and if I copy web
the server does not work)and afterall I used
systemctl restart nginx.service indico-celery.service indico-uwsgi.service
systemctl enable nginx.service postgresql.service redis-server.service indico-celery.service indico-uwsgi.service
to launch indico, and there were no error massages. but still I got this problem.
what can I do for solving this problem?
Sounds like you did not run indico db upgrade
to apply the database upgrades.
it works after run indico db upgrade
,
Thank you for all your helps
Thanks again.
Dear ThiefMaster,
Iām the same user above(username āģ¹ķā),
afterall, can use the server and the backup was successful but still I cannot modifying its contents
so, on the web
I cannot click those buttons with red square, using admin account and cannot log off also
for your information, I moved the server from Apache, CentOS to Nginx, Ubuntu.
and downloading pdf files also give 403 Forbidden.
Most likely loading JS fails. Open one of the urls to those files (check āview sourceā to get the urls) directly and see what error you get. Also check the nginx/apache error log.
Most likely permissions e.g. for the /opt/indico/cache folder are broken.
The error is (13: Permission denied)
,
so I trying to change user setting(now it is user www-data;
) in etc/nginx/nginx.conf
,
what should I use for the user name? or any other solutions exist?
Please do not post incomplete log messages, it would have been helpful to know the file/path where permission was denied. Anyway, if you get permission denied, then my guess would be that the nginx group (usually www-data
) cannot access the relevant indico files.
Confirm that:
/opt/indico
is owned byindico:www-data
and has has at least the x bit set for group permissions- files that actually need to be read by nginx (such as the ones in cache, tmp and archive) of course need to be group-readable as well (x on directories just allows entering them)
If you still need help, please get the full path to the file where access is denied, and then show me the output of ls -ld
commands like this:
ls -ld /opt/indico/whatever/something/file.xyz
ls -ld /opt/indico/whatever/something
ls -ld /opt/indico/whatever
ls -ld /opt/indico