fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Valentin Lab b5e438e1d9 fix: [base] target debian ``9.13`` as well as ``9`` when installing ``fzf`` 1 year ago
..
hooks fix: [cyclos] support missing relation ``web-proxy`` 2 years ago
lib new: [cyclos] loading a default database for preconfiguration 4 years ago
src fix: [cyclos] remove need to renew password of admin at first install 2 years ago
README.org fix: [cyclos] make "global administration" link work when using license data changing procedure 2 years ago
metadata.yml new: [cyclos] update to version ``4.14.17`` 3 years ago

README.org

Cyclos

Upgrade

Migration of existing database

This is taken into account on first run of the newer version.

Cleaning an existing database to share a new version of it

The initial dump provided should probably use:

delete from account_balances;
delete from dirty_account_balances;
delete from closed_account_balances;

delete from imported_file;
delete from imported_files;

delete from account_balances where account_id in (select id from accounts where user_id in (select id from users where status ='PURGED'));
delete from user_status_logs where user_id in (select id from users where status = 'PURGED');
delete from messages_to_users where user_id in (select id from users where status = 'PURGED');
delete from ads where owner_id in (select id from users where status = 'PURGED');

delete from passwords where user_id in (select id from users where status = 'PURGED');
delete from user_group_logs where user_id in (select id from users where status = 'PURGED');

delete from admin_notif_settings_fwd_message_categories where preference_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);
delete from admin_notif_settings_user_groups where preference_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);
delete from notification_type_settings where settings_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);
delete from admin_notif_settings_user_alerts where admin_notification_preference_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);

delete from admin_notif_settings_external_payments_expired where preference_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);

delete from admin_notif_settings_external_payments_failed where preference_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);

delete from admin_notif_settings_payments where preference_id in (
    select id from notification_settings where user_id in (
    select id from users where status = 'PURGED')
);
delete from notification_settings where user_id in (select id from users where status = 'PURGED');

delete from user_activities where user_id in (select id from users where status = 'PURGED');
delete from trusted_devices where user_id in (select id from users where status = 'PURGED');


delete from messages_to_groups where message_id in (
    select id from messages where
        messages.owner_user_id in (select id from users where status = 'PURGED') or
        messages.sentby_user_id in (select id from users where status = 'PURGED'));

delete from messages where owner_user_id in (select id from users where status = 'PURGED') or
    sentby_user_id in (select id from users where status = 'PURGED');

delete from notifications where user_id in (select id from users where status = 'PURGED');

delete from failed_action_logs where user_id in (select id from users where status = 'PURGED');


delete from users where status = 'PURGED';

delete from ad_history_logs;
delete from notified_ad_interests;
delete from alerts;
delete from error_logs;
delete from entity_property_logs;
delete from entity_logs;
delete from login_history_logs;
delete from messages;


delete from failed_action_logs;

This will set back admin password to 1234 as stated in cyclos maintenance documentation

UPDATE passwords
  SET value='$2a$10$yM.uw9jC7C1DrRGUhqUc3eSR6FCJH0.HdDt3CJs8YL56iATHcXH7.'
  WHERE user_id = (SELECT id FROM users WHERE username='admin')
    AND status = 'ACTIVE'
    AND password_type_id in (
      SELECT id FROM password_types
      WHERE input_method = 'TEXT_BOX'
        AND password_mode = 'MANUAL'
    );

UPDATE passwords
  SET value = '$2a$04$rDPKseEiJhYdjx9RogW2tuzNX4TKG1wcE79ooEXiA5.mJF.ooZY/2'
  WHERE status <> 'OLD'
  AND password_type_id in (
    SELECT id FROM password_types
      WHERE input_method = 'TEXT_BOX'
        AND password_mode = 'MANUAL'
  );

UPDATE users
  SET email = concat(username, '@test.com')
  WHERE email IS NOT null;

This needs to be deleted also for any dumps.

delete from database_lock;

In java also:

compose --debug stop cyclos
compose --debug --no-hooks run --entrypoint bash cyclos

then inside the docker:

java -cp "WEB-INF/classes:WEB-INF/lib/*:/usr/local/tomcat/lib/*" \
  org.cyclos.db.DeleteNetworkData

(remove all users and transfer, choice 1, then 'yes')

Changing Licence information

This command is to be executed from the host, knowing that here cyclos stands for the name of the cyclos service:

compose sql cyclos <<EOF
  update application
    set
      license_key = null,
      license_data = null,
      local_license_data = null;
EOF

Restart cyclos

docker restart myc_cyclos_1

Then go to URL /global/classic with a browser… follow wizard with your id and password from cyclos licence server.

You have to create a new admin that will need to be removed afterwards. It is a good idea to give him the identifier: adminTemp.

At the end of the wizard, you'll have a broken interface. You can point to the root url and then disconnect, and reconnect with the standard admin.

Because the procedure re-setted the root_url settings, you need to launch a re-deployment:

compose up

Then, in the browser, once logged in the standard admin, you can go to Global Administration, settings, then users management, and select adminTemp user, and ask to remove it. Purge it completely.