2
0
Commit Graph

45 Commits

Author SHA1 Message Date
Lunny Xiao
c2363c76fa fix dump non-exist log directory (#9818) 2020-01-16 21:56:51 -05:00
Rychu
a32ee426eb Fixed errors logging in dump.go (#9218)
* Fixed errors logging in dump.go

* Replaced overlooked log.Fatal() with fatal()

* Run make fmt on dump.go

* Added missing new line to the fatal log

* Run make fmt on dump.go
2019-12-17 18:12:10 +02:00
Lunny Xiao
9fa540473b Move database settings from models to setting (#7806)
* move database settings from models to setting

* update docs

* fix checkout pr

* fix tests

* fix lint

* remove unsupported tidb options

* correct wrong variable name

* remove tidb totally
2019-08-24 11:24:45 +02:00
Tamal Saha
3edebfe6ac Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
2019-08-23 12:40:29 -04:00
John Olheiser
a1c500d75b Change verbose flag in dump command to avoid colliding with global version flag (#6822)
* Change verbose flag to avoid colliding with version flag
* Update docs

Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-05-01 21:36:09 +01:00
zeripath
e5f6da031a Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 2019-04-29 14:08:21 -04:00
mrsdizzie
bb86f7e11d Include custom configuration file in dump (#6516)
When running the dump command, include the specific configuration file
provided as part of the backup. Currently we only zip up custom/ and this
misses the config file if it is somewhere else, like /etc/gitea/app.ini

Fixes #6034
2019-04-05 09:24:28 -04:00
glaszig
72e4e155a9 support custom file name in gitea dump command (#6474)
* support custom file name in `gitea dump` command

* simpler approach to handle default dump file name
in `gitea dump` command
2019-04-01 00:31:37 -04:00
Zsombor
8eefb8af47 Add flag to skip repository dumping (#5695) 2019-01-13 16:52:25 -05:00
Morgan Bazalgette
e45a300221 General refactor of the cmd package (#3328)
* General refactor of the cmd package

* Address breakage in runCreateUser

* Place "common" functions into cmd.go
2018-01-12 23:16:49 +01:00
Guillaume Dube
05fa8a5c8e Set session and indexers' data files rel to AppDataPath (#2192)
* Set session and indexers' data files rel to AppDataPath

The setting AppDataPath is now relative to the working directory.
The session svc's PROVIDER_CONFIG now defaults to AppDataPath/data/sessions.
The issue indexer's IssuePath now defaults to AppDataPath/indexers/issues.bleves.

* fix bug
2017-11-03 10:56:20 +02:00
Jonas Östanbäck
8d080c45ef Set TMPDIR enviroment variable for dump command (#1915) 2017-06-08 19:24:15 -05:00
Bo-Yi Wu
275057e645 refactor: show command help message. (#1486) 2017-04-12 15:44:54 +08:00
Lunny Xiao
8242994ab7 bug fix for dump when data directoryis not exist (#1025) 2017-03-02 17:41:33 +08:00
Lunny Xiao
e521de1bec remove unused fixme on dump command (#1065) 2017-02-26 16:01:49 +08:00
Gabriel Jackson
e8c47d9765 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
2017-02-02 15:24:18 +01:00
Lunny Xiao
8abb4d2363 Update xorm and fix dump command (#692)
* update xorm and fix dump

* catch database init error

* still use dumpTables

* fix dump bool type

* update vendor.json
2017-01-23 17:11:18 +08:00
Manuel Kuhlmann
20f1c8a946 Add data directory excluding sessions to dump (#587) 2017-01-12 12:47:20 +08:00
Lunny Xiao
18a88b582a Update xorm and dependencies vendor for feature to dump to other database (#565)
* update xorm and dependencies vendor for feature to dump to other database

* fix golint
2017-01-03 16:20:28 +08:00
Joubert RedRat
150e81104c Remove remaining Gogs reference on locales and cmd (#430) 2016-12-21 20:13:17 +08:00
Bwko
e5314f667c Catch os... errors 2016-12-02 07:41:19 +01:00
Bo-Yi Wu
b6a8acc967 fix gofmt error.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-15 00:03:37 +08:00
Sandro Santilli
acb138c244 Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
Matthias Loibl
cd1638803d Use cli Flags directly and not some helper funcs
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2016-11-09 23:18:22 +01:00
Thomas Boerger
8e6bde2874 Made linter happy in cmd folder 2016-11-04 23:45:06 +01:00
Rémy Boulanouar
61ec6729e6 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
Kim "BKC" Carlbäcker
ee478cfb79 codegangsta/cli => urfave/cli (#3546) 2016-08-30 04:57:58 -07:00
Thibault Meyer
ccd4e903dc Fix #3361: Dumps are created world readable (#3473)
* Set dump file permission to 0600

* Typo
2016-08-17 11:38:42 -07:00
Alex Myasoedov
211ef71604 gogs dump tempdir flag (#3086) 2016-05-23 17:10:05 -07:00
Unknwon
11b5481756 #3045 fix DEPRECATED Action signature erorr 2016-05-12 14:32:28 -04:00
kakwa
80e042dee3 add name of the dump file in last log message 2015-11-28 15:22:10 +01:00
kakwa
d1b1ab7bdc Fix dump of log and custom directory in dump cmd
Now, the dump cmd uses setting.CustomPath and setting.LogRootPath
instead of setting.WorkDir which was kind of broken if the gogs
binary was in a different directory than gogs data.
Additionally, the backup of setting.CustomPath directory is only done
if it exists.
2015-11-28 15:08:50 +01:00
kakwa
9d88360ac5 Using a tmp dir to generate db and repo dumps
Using a tmp dir makes gogs dump more robust to concurrent runs.

It also permits an easier cleaning of the tmp files (gogs-db.sql and
gog-repo.zip) by just removing the tmp dir.

As a side effect, it partially fix bugs on workdir.
Previously, 'gogs dump' created the archives in the current directory,
and tried to include these archives from the directory where the
gogs binary lies.
ex: if gogs binary is in /usr/bin/gogs, and gogs dump is run from /tmp/,
/tmp/gog-repo.zip is created, but gogs dump tried to include
/usr/bin/gogs-repo.zip.
2015-11-28 14:07:51 +01:00
kakwa
e585775d12 Adding more error handling in dump cmd
The dump cmd did not check the return value of the z.AddFile or
z.AddDir when building the final archive.
It caused the dump command to succeed even if an error occurred.
The resulted dump archive could be corrupted/empty.
(errors could be various: removal by a concurrent process, disk full,
bugs in the dump cmd itself)
2015-11-28 12:11:38 +01:00
Unknwon
96e2cb89c7 fix api broken 2015-11-15 17:07:44 -05:00
Unknwon
5ca6821fe5 simplify names 2015-09-16 23:08:46 -04:00
Unknwon
bc9746281f cmd: code fix for #905
- routers/admin: add rewrite update hook operation
- conf/locale: update locale file due to ini behavior changes
- cmd/cert_stub.go: remove useless code
- cmd/fix.go: no longer need fix command(at least now)
2015-02-08 21:26:14 -05:00
Peter Smit
9dd98a9a0f Add option to provide configuration file on command line 2015-02-05 12:17:35 +02:00
chai2010
f9ad8d6903 Fix #656 2014-11-24 10:58:39 +08:00
Unknwon
b2632dec09 Page: Compare 2 commits 2014-10-10 21:40:51 -04:00
Unknwon
f8977f4847 Organization level webhooks 2014-09-07 19:39:26 -04:00
Unknown
688ec6ecbd Fixed #209 2014-05-25 20:11:25 -04:00
Unknown
c1eb4d894a Clean api code 2014-05-05 13:08:01 -04:00
Unknown
a641854cad command dump 2014-05-05 00:55:17 -04:00
Unknown
3bd5fc6d6f Add command dump and move to cmd did 2014-05-01 21:21:46 -04:00