• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • πŸ‘‰ Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • πŸ’Έ Purchase a Pro Subscription to get access to active software support and faster ticket response times.

AUS to Chevereto v.3

Avast

πŸ‘½ Chevereto Freak
Hi guys,

the updater is finished!

What does the updater do?

The updater makes it possible for AUS-user to update their chv2.x to chv.3 without losing userdata.

Note: All passwords get lost, so inform your users to use password-forgotten to set a new one.

Functions:
  1. Copies important data as backup
  2. Edits the chv3 tables (update purpose)
  3. Imports AUS-users to chv3-users (generates random user_usernames for accounts without a username)
  4. Connects images to their uploader (User gets them listed in his/her account)
  5. Necessary count of images, to set the right amount in the user-table
  6. Deletes all AUS-data (DB-only!)

I noticed some strange bugs while testing the updater, the mysql-process used a lot of memory (between 1gb an 5gb).

You have to take a look after step 3 and 4 , if everything is right in your db.
I only tested "connect images to user" with 5300 records, so more could take a lot of time.

Please use "import users" only one-time, or could get duplicate entrys.

Step 4 (connect images) after finishing the process, reload the site and click the button once more, if the success window tells you 0, everything is right->proceed with step 5.

Step 5 will take a while (tested with 5300 records).

Last step: get rid of AUS, if you want to keep the data don't click the button (It won't affect your chv3 system).


_____________


Setup the updater:

in chv2.x paste the whole folder (aus_update) into your directory index (user/public_html/www/chevereto/).

edit sql.php in aus_update (use the database of your chv2.x).

Then type in your browser: http://mysite/aus_update
The updater should appear.

Follow step one.
Update chevereto to chv3 (at least 3.2.5).

aus_update should now be in the same directory-level as index.php and install.php of chv3.x.

return to http://mysite/aus_update and follow the next steps.

If everything was right, welcome to CHV3!

_____________

Do you have problems to update chevereto?

I had some problems to update chv2.x to chv3, now i'll provide some solutions:

  1. G\ app/settings.php not found -> just create an empty settings.php in chevereto/app/
  2. Could not create admin-account -> all needed sql-statements are in chevereto/app/install/sql copy and run users.sql
  3. If you get more errors like that, open the specific sql file and run the query manually (DO NOT RUN THE CODE OF images.sql)
  4. run the following querys for chv_images (
    ALTER TABLE `chv_images`
    MODIFY `image_id` bigint(32) NOT NULL AUTO_INCREMENT,
    MODIFY `image_name` varchar(255),
    MODIFY `image_date` DATETIME,
    CHANGE `image_type` `image_extension` varchar(255),
    CHANGE `uploader_ip` `image_uploader_ip` varchar(255),
    CHANGE `storage_id` `image_storage_id` bigint(32),
    DROP `image_delete_hash`,
    ADD `image_date_gmt` datetime NOT NULL AFTER `image_date`,
    ADD `image_description` text,
    ADD `image_nsfw` tinyint(1) NOT NULL DEFAULT '0',
    ADD `image_user_id` bigint(32) DEFAULT NULL,
    ADD `image_album_id` bigint(32) DEFAULT NULL,
    ADD `image_md5` varchar(32) NOT NULL,
    ADD `image_storage` enum('external','direct','datefolder','old') NOT NULL DEFAULT 'datefolder',
    ADD `image_original_filename` text NOT NULL,
    ADD `image_original_exifdata` text,
    ADD `image_views` bigint(32) NOT NULL DEFAULT '0';

    UPDATE `chv_images`
    SET `image_date_gmt` = `image_date`,
    `image_storage` = CASE
    WHEN `image_storage_id` IS NULL THEN 'datefolder'
    WHEN `image_storage_id` = 0 THEN 'datefolder'
    WHEN `image_storage_id` = 1 THEN 'old'
    WHEN `image_storage_id` = 2 THEN 'direct'
    END,
    `image_storage_id` = NULL;

    RENAME TABLE `chv_info` to `_chv_info`;
    RENAME TABLE `chv_options` to `_chv_options`;
    RENAME TABLE `chv_storages` to `_chv_storages`;)
I'll appreciate every donation for my work ;)

Initial release: Version 1.0
Update: Version 1.1 translated comments to english
Update: Version 1.2 set inactive AUS-accounts to "awaiting-confirmation"
 

Attachments

  • aus_update.zip
    9 KB · Views: 10
Last edited:
Just do a bit at a time mate. I for one would be very interested in updating to the newer Chevereto version without losing user details from AUS.
I know quite a few other people would also appreciate it. :)
 
I'm proud to tell you, that i already imported all AUS-users to chv 3.2.5.
After password-reset i was able to log in.

Now i'll write the image-connector, so every user has his own images ;)
 
Updated updater to Version 1.2 (set inactive AUS-accounts to "awaiting-confirmation")
 
Hi, I've finally attempted updating to chv3 :) everything was going good until part 3... and it seems to have stopped... I've left it running for about 3 hours. Should it take that long for part 3?

RbaKd.png


I've taken a look at PHPMyAdmin, and nothing appears to be changing after I press the import button??

Please help thanks.

--- edit ---
For your information, I am attempting to update to 3.2.6 (not 3.2.5 - I hope this isn't a problem, the database side of things should still be the same)

I decided to run it again, over night, and the progress bar hasn't disappeared, or have there been any changes to PHPMyAdmin ? :S
 
Last edited:
The Update to 3.2.6 is not a problem.

PHPMyAdmin is just an interface for the sql-server, so it has nothing to do with the updater.

If you login to your PHPMyAdmin, please take a look at the chv_users table.
Are there all of your users? And do the users without username now have a random name?

Furthermore take a look at your error.log.
If you've got ssh use this command: tail -f /var/log/apache2/pathe-to-error-log

if there are some numbers like: " 1,2,3,4,5,6.... " the importer worked fine, only the progressbar + js have some errors.
 
The Update to 3.2.6 is not a problem.

PHPMyAdmin is just an interface for the sql-server, so it has nothing to do with the updater.

If you login to your PHPMyAdmin, please take a look at the chv_users table.
Are there all of your users? And do the users without username now have a random name?

No, there's only one username... and that's mine. This was the table that I was looking at when I decided that nothing was changing, so I figure that something might be wrong somewhere.

Furthermore take a look at your error.log.
If you've got ssh use this command: tail -f /var/log/apache2/pathe-to-error-log

if there are some numbers like: " 1,2,3,4,5,6.... " the importer worked fine, only the progressbar + js have some errors.

I looked at the error log, I don't think there is anything out of the ordinary.... They all seem to be really old errors from 2013.

One more thing that I'll add is that I'm attempting the update on a new folder - Using a backup of my site with a secondary SQL database (if that makes sense) - Just to see if it works ok before I attempt it on my main website / database.

I just got your PM.. I'll reply to that also.
 
Error found:

array(3) { [0]=> string(5) "23000" [1]=> int(1062) [2]=> string(61) "Duplicate entry 'mail@mail.com' for key 'email'" } bool(true)

Please make sure, that your admin-account of CHV uses a different email-adress as any of your AUS-accounts.
 
Thank you very much. It's getting late here now, so I wont proceed with step 4 just yet... I'll start that tomorrow morning :)
Thanks again!
 
Just to update you on the progress of my testing phase. Before I go ahead and complete the task on my live website.

Connecting the images to all the users, took about 48 hours, maybe a little bit more lol.
I do have 900,000 images though.

The next process, counting the images, took less time, and appears to have completed correctly.

I'm now going on holiday for two weeks, so when I'm back, I'll attempt to update my main website :) Fingers crossed.

Your tool works great Avast, and if I haven't spent all my beer money on holiday, I'll be sure to throw some your way when I'm back!!
Thanks for your help.
 
Hi, I'm back from holiday :)

I'm going to attempt the upgrade on my main site now.

I've got a couple of questions before I go ahead.
Like I said before, this took roughly about 48 hours to complete all stages of the upgrade due to the amount of images that I have. What would be the best way of doing this with minimum downtime?

Could I do the following??
Complete step 1, and then Update to CHV3.

Complete steps 2 & 3

v4pF6.png


Step 4, takes the longest amount of time.
Could I start this step, and just leave it running .... whilst the website is still up and new images are being uploaded?

And then complete steps 5 and 6.

I understand that the images wont be connected to the users until steps 4 and 5 have been completed, but I'd just like to make sure that no problems will be encountered with keeping the site up whilst doing the updates.

Thanks
 
Please do not update the live-version of your site!

I did it like this:

1. copied all files to a second directory (live old version was still live).
2. update the second version
3. sync the image-folders (old-live to updated one) , to get all new files of the old version and put it into the updated version
4. sync the new entries of the database to the new one
5. change your v-hosts to the updated version

If you do it like this, your site won't be offline and your users can still upload images + all images

I used rsync to sync the folders.
 
LOL!!! NOW YOU REPLY :p lol Just kidding.

Well, typically I done it last night.
I updated my LIVE version lol.

However, it doesn't look like I've encountered any major issues (yet), apart from the API not working. I've submitted a post in the tech support area of the forum.

http://chevereto.com/community/thre...stead-of-giving-api-response.4879/#post-27858

I'm still waiting for step 4 to complete (Connect images to users), this is running - and I knew this would take a bit of time. I'm checking the database now and again, and it is definitely updating.
Once this is done I will complete step 5 (Count images).

When I tested this on my previous trial, I found that all the images showed up into peoples accounts after step 5 was complete.

Thanks for the reply though.
I will be clicking on that donate button tonight. I'm very happy that I'm now able to update to the latest version, and start working on some sort of theme to make it 'my own' as such.

Thank you again for this !!!
 
Last edited:
Back
Top