>And here I thought you assume the users of your software know what they are doing.
lmao are you for real
>Did you make up your mind on monthly auto-tagging?
it's a definite no
Periodic releases are over
Re: Periodic releases are over
Hi, I've modified the script from cktt and scottjl in order to backup also the database before updating tt-rss.
This version does nothing if there is no need to update, otherwise it performs backups and restart the update daemon (but only if it was already running).
I didn't test the backup part on PostgreSQL (I'm using mysql), I hope there are no problems with it.
I'm using it under Debian without problems, maybe you need to modify something in your environment.
You may need to add other configuration changes in the sed section.
This version does nothing if there is no need to update, otherwise it performs backups and restart the update daemon (but only if it was already running).
I didn't test the backup part on PostgreSQL (I'm using mysql), I hope there are no problems with it.
I'm using it under Debian without problems, maybe you need to modify something in your environment.
You may need to add other configuration changes in the sed section.
Code: Select all
#!/bin/bash
### CONFIGURATIONS ###
# Directory configuration
DIRGIT=/path/to/git/folder
DIRTT=/path/to/website
DIRBK=/path/to/backups
# Database configurations
DB_TYPE="MYDBTYPE" # pgsql or mysql
DB_HOST="MYDBHOST"
DB_USER="MYDBUSER"
DB_NAME="MYDBNAME"
DB_PASS="MYDBPASS"
DB_PORT="MYDBPORT"
# Other configurations
SELF_URL_PATH="http://MYWEBSITE/PATH/"
REG_NOTIFY_ADDRESS="MYNOTIFYADDRESS"
SMTP_FROM_ADDRESS="MYREPLYADDRESS"
FEED_CRYPT_KEY="MYCRYPTKEY"
### SCRIPT ###
DATE=$(date +%F)
# check if the daemon is running
if [ -f "$DIRTT/lock/update_daemon.lock" ] ; then
STARTSTOPDAEMON="true"
else
STARTSTOPDAEMON="false"
fi
cd $DIRGIT
git fetch origin
reslog=$(git log HEAD..origin/master --oneline)
if [[ "${reslog}" != "" ]] ; then
# there are new changes: completing the pull
git merge origin/master
# shut down the update daemon if needed
$($STARTSTOPDAEMON) && /sbin/start-stop-daemon -K -p $DIRTT/lock/update_daemon.lock
cd $(dirname $DIRTT)
# back up current install files...
tar -czf $DIRBK/tt-rss-${DATE}.tar.gz $(basename $DIRTT)
# ... and database...
if [ "$DB_TYPE" == "mysql" ] ; then
MYSQL_PWD="$DB_PASS" mysqldump -h $DB_HOST -P $DB_PORT -u $DB_USER $DB_NAME | gzip > $DIRBK/tt-rss-${DATE}.sql.gz
else
PGPASSWORD="$DB_PASS" pg_dump -w -h $DB_HOST -p $DB_PORT -U $DB_USER $DB_NAME | gzip > $DIRBK/tt-rss-${DATE}.sql.gz
fi
# ... and delete backups older than 2 weeks
find $DIRBK -mtime +14 -exec rm {} \;
# copy only modified files, except git related
rsync -rvch --exclude=.git/ --exclude=.buildpath --exclude=.gitignore --exclude=.project $DIRGIT/ $DIRTT
# always use new config file, maybe there are new parameters
# change config file to personalized settings
sed $DIRGIT/config.php-dist -f - <<-SED_SCRIPT > $DIRTT/config.php
/DB_TYPE/ s/pgsql/$DB_TYPE/
/DB_HOST/ s/localhost/$DB_HOST/
/DB_USER/ s/fox/$DB_USER/
/DB_NAME/ s/fox/$DB_NAME/
/DB_PASS/ s/XXXXXX/$DB_PASS/
/DB_PORT/ s/''/'$DB_PORT'/
/SELF_URL_PATH/ s#http://example.org/tt-rss/#$SELF_URL_PATH#
/REG_NOTIFY_ADDRESS/ s/[email protected]/$REG_NOTIFY_ADDRESS/
/SMTP_FROM_ADDRESS/ s/[email protected]/$SMTP_FROM_ADDRESS/
/FEED_CRYPT_KEY/ s/''/'$FEED_CRYPT_KEY'/
SED_SCRIPT
# start the update daemon if needed
$($STARTSTOPDAEMON) && /sbin/start-stop-daemon -b -c www-data:www-data -S -x /usr/bin/php $DIRTT/update_daemon2.php -- --feeds --quiet
fi
Re: Periodic releases are over
Hey, thanks!
Re: Periodic releases are over
Latimer wrote:Additionally, for those missing tarballs, there is a big button on a github page that offers anyone to "Download the contents of gothfox/Tiny-Tiny-RSS as a zip file". Press it and make your own tarball whenever you feel like it.
For those interested in the process/steps needed to perform an update without git clones/pulls or can't/don't want it scripted, here are the steps that I used:
- 1. Backup your database, I happen to use phpMyAdmin
2. Click the "Download Zip" button on the GitHub (https://github.com/gothfox/Tiny-Tiny-RSS) website
3. Rename/copy/backup your tt-rss folder (as a backup)
4. Upload/extract the zip file to your tt-rss folder
5. Copy the config.php file, feed-icons folder, and any custom or downloaded plugins (these had to be re-uploaded during the old process as well)
6. You can either compare the config.php and config.php-dist files to see any changes or you can simply try logging in and see if you get any error messages that will lead you to what needs adding/changing
Re: Periodic releases are over
I just wanted to clarify, the upgrade process is basically:
Log in as admin to handle database upgrades.
That all sound legit?
Code: Select all
git fetch --all
git pull
Log in as admin to handle database upgrades.
That all sound legit?
Re: Periodic releases are over
jwhipp wrote:I just wanted to clarify, the upgrade process is basically:Code: Select all
git fetch --all
git pull
Log in as admin to handle database upgrades.
That all sound legit?
No, just git pull: http://stackoverflow.com/questions/2923 ... -git-fetch
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: Periodic releases are over
ebell451 wrote:Latimer wrote:Additionally, for those missing tarballs, there is a big button on a github page that offers anyone to "Download the contents of gothfox/Tiny-Tiny-RSS as a zip file". Press it and make your own tarball whenever you feel like it.
For those interested in the process/steps needed to perform an update without git clones/pulls or can't/don't want it scripted, here are the steps that I used:1. Backup your database, I happen to use phpMyAdmin
I am surprised to see the number of people that are intimidated by this process or don't want to put the effort into "the new way" for such a valuable application. If you can get it up in running in the first place, this should not be an issue. Just remember not to mess with the database, backup your existing setup and you should be fine. All told, the update process took less than 10 minutes.
2. Click the "Download Zip" button on the GitHub (https://github.com/gothfox/Tiny-Tiny-RSS) website
3. Rename/copy/backup your tt-rss folder (as a backup)
4. Upload/extract the zip file to your tt-rss folder
5. Copy the config.php file, feed-icons folder, and any custom or downloaded plugins (these had to be re-uploaded during the old process as well)
6. You can either compare the config.php and config.php-dist files to see any changes or you can simply try logging in and see if you get any error messages that will lead you to what needs adding/changing
why would you do all that instead of typing literally one command i just don't understand
Re: Periodic releases are over
fox, fox, fox...why do you ask questions like this? Because some of use like to do things the hard way. I will tell you the truth, but the answer will probably not be desirable. My setup is on a shared hosting provider, so I was talking to "that group" of users. Yes, I'm one of those users.
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: Periodic releases are over
you would probably be better off git syncing someplace better equipped and rsyncing to your shit hosting.
Re: Periodic releases are over
ebell451 wrote:fox, fox, fox...why do you ask questions like this? Because some of use like to do things the hard way. I will tell you the truth, but the answer will probably not be desirable. My setup is on a shared hosting provider, so I was talking to "that group" of users. Yes, I'm one of those users.
My shared hosting provider provides git. Lucky me I guess.
Re: Periodic releases are over
fox wrote:you would probably be better off git syncing someplace better equipped and rsyncing to your shit hosting.
thanks for the suggestion...yes, it may be shit hosting, but there are advantages to shared hosting sites [blasphemy on this site, I know] as well as some disadvantages
HunterZ wrote:My shared hosting provider provides git. Lucky me I guess.
I've since found out that my host provides git as well.
Re: Periodic releases are over
Its sad to see you're forcing users to use git to update your software. Probably i am one of a few users installing TT-RSS from Linux repositories provided by my distribution. This way provides me with a simple solution to keep up to date with my whole system (and its web applications) without having to jump from directory to directory running git commands.
- sleeper_service
- Bear Rating Overlord
- Posts: 884
- Joined: 30 Mar 2013, 23:50
- Location: Dallas, Texas
Re: Periodic releases are over
slooper wrote:Its sad to see you're forcing users to use git to update your software. Probably i am one of a few users installing TT-RSS from Linux repositories provided by my distribution. This way provides me with a simple solution to keep up to date with my whole system (and its web applications) without having to jump from directory to directory running git commands.
well, aren't you just the most precious thing?
in any event, if you're using the linux repositories, then go to them whenever something messes up, neither tarballs nor git are applicable to your misapplication.
shoo.
Re: Periodic releases are over
sleeper_service wrote:
well, aren't you just the most precious thing?
in any event, if you're using the linux repositories, then go to them whenever something messes up, neither tarballs nor git are applicable to your misapplication.
shoo.
I am not talking about the tarballs or anything else. It does not matter how you ship your software. The fact that there will be no more versions of this software makes it somewhat hard to keep it in Linux repositories.
-
- Bear Rating Overlord
- Posts: 373
- Joined: 20 Aug 2013, 23:13
Re: Periodic releases are over
slooper wrote:The fact that there will be no more versions of this software makes it somewhat hard to keep it in Linux repositories.
No, it doesn't. There are still builds based on the most recent Git commit.
Also, repository maintainers often affix their own version codes separate from the main code base so they can backport fixes or tweak other aspects of the code.
Again, folks, after the initial setup we are literally talking about entering TWO words into a shell and pressing return.
Who is online
Users browsing this forum: No registered users and 1 guest