{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/4991","repository_url":"https://api.github.com/repos/gogits/gogs","labels_url":"https://api.github.com/repos/gogits/gogs/issues/4991/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/4991/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/4991/events","html_url":"https://github.com/gogits/gogs/issues/4991","id":288340540,"number":4991,"title":"when using sudo su git -c'/home/git/gogs/gogs backup', miss data directory ","user":{"login":"qianlongzt","id":18493471,"avatar_url":"https://avatars3.githubusercontent.com/u/18493471?v=4","gravatar_id":"","url":"https://api.github.com/users/qianlongzt","html_url":"https://github.com/qianlongzt","followers_url":"https://api.github.com/users/qianlongzt/followers","following_url":"https://api.github.com/users/qianlongzt/following{/other_user}","gists_url":"https://api.github.com/users/qianlongzt/gists{/gist_id}","starred_url":"https://api.github.com/users/qianlongzt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qianlongzt/subscriptions","organizations_url":"https://api.github.com/users/qianlongzt/orgs","repos_url":"https://api.github.com/users/qianlongzt/repos","events_url":"https://api.github.com/users/qianlongzt/events{/privacy}","received_events_url":"https://api.github.com/users/qianlongzt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-13T16:23:20Z","updated_at":"2018-04-02T08:48:32Z","closed_at":null,"author_association":"NONE","body":"I speak Chinese, sorry for my English.\r\n\r\n- Gogs version (or commit ref):  0.11.34.1122\r\n- Git version: 2.15.1\r\n- Operating system: ubuntu 16.04 LTS\r\n- Database (use `[x]`):\r\n  - [ ] PostgreSQL\r\n  - [x] MySQL\r\n  - [ ] MSSQL\r\n  - [ ] SQLite\r\n- Can you reproduce the bug at https://try.gogs.io:\r\n  - [ ] Yes (provide example URL)\r\n  - [ ] No\r\n  - [x] Not relevant\r\n- Log gist (usually found in `log/gogs.log`):\r\n\r\n## Description\r\n\r\nif I use `./gogs backup` in normal way, all work well. It will include data directory\r\n\r\n如果我用正常的方式使用 `./gogs backup`，一起正常。它会包含 data 目录。\r\n\r\n```\r\ngit@hduhelpf1:~/gogs$ ./gogs backup --target=/home/git/backupgogs\r\n\r\n...\r\n\r\n2018/01/13 22:55:04 [ INFO] Repositories dumped to: /tmp/gogs-backup-228536360/repositories.zip\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/custom\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/custom/conf\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/custom/conf/app.ini\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/custom/templates\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/custom/templates/inject\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/custom/templates/inject/head.tmpl\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/metadata.ini\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/repositories.zip\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/0\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/0/6\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/0/6/0631cc64-d544-461e-a6f9-aaec71f9ef6c\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/0/7\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/0/8\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/a\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/a/3\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/a/3/a36f130b-6f69-4954-9a5c-5cd30c32e2b4\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/6\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/6/5\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/6/5/65a28dda-10bf-4d51-8c17-b9fa68f05090\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/6/8\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/6/8/68c7b027-65c1-4a50-8629-ef230229d223\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/6/d\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/b\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/b/3\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/b/3/b391e587-dc80-4486-9b2d-fa80d3f21390\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/b/6\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/5\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/5/6\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/5/e\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/5/e/5eb1eb1c-e8b2-4908-ad64-66ba60b19cce\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/e\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/e/4\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/7\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/7/7\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/7/7/772368eb-72f6-46b2-ab1a-01efc639a6f5\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/8\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/8/f\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/8/f/8f63949c-71cb-4173-b9b0-b2b187f5725c\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/8/7\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/c\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/c/7\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/c/9\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/c/9/c9df9fb7-0ba7-44ec-8372-abd73c6df922\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/1\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/1/7\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/1/c\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/1/c/1c821e4c-257e-4434-806c-d57fe3c12b24\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/4\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/4/f\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/4/5\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/4/c\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/attachments/4/c/4cd823db-272d-4349-9439-02667e48ecc6\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/17\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/24\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/25\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/13\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/3\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/16\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/21\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/28\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/6\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/22\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/27\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/18\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/10\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/11\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/29\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/20\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/7\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/23\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/8\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/12\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/14\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/26\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/2\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/1\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/19\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/4\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/data/avatars/9\r\nAdding dir.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/DeployKey.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/TwoFactorRecoveryCode.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/LoginSource.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Collaboration.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Notice.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Upload.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/User.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/EmailAddress.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/ProtectBranchWhitelist.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Issue.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/HookTask.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Action.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/OrgUser.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/TeamRepo.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/IssueUser.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/IssueLabel.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/PullRequest.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/TwoFactor.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Attachment.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/PublicKey.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Watch.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Label.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Access.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Milestone.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Version.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/TeamUser.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/AccessToken.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Team.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Follow.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Comment.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/ProtectBranch.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Repository.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Release.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Mirror.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Star.json\r\nAdding file.../tmp/cae/gogs-backup-20180113225452.zip/gogs-backup/db/Webhook.json\r\n2018/01/13 22:55:15 [ INFO] Backup succeed! Archive is located at: gogs-backup-20180113225452.zip\r\n```\r\n\r\nbut if I use `./gogs backup ` under sudo su git -c '', it will miss data dirctory\r\n\r\n```\r\nqianlongzt@hduhelpf1:/home/git/backupgogs$ sudo su git -c'/home/git/gogs/gogs backup -v --target /home/git/backupgogs '\r\n\r\n....\r\n\r\n2018/01/13 23:24:59 [ INFO] Repositories dumped to: /tmp/gogs-backup-491693953/repositories.zip\r\nAdding dir.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup\r\nAdding dir.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/custom\r\nAdding dir.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/custom/conf\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/custom/conf/app.ini\r\nAdding dir.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/custom/templates\r\nAdding dir.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/custom/templates/inject\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/custom/templates/inject/head.tmpl\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/metadata.ini\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/repositories.zip\r\nAdding dir.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/DeployKey.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/TwoFactorRecoveryCode.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/LoginSource.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Collaboration.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Notice.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Upload.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/User.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/EmailAddress.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/ProtectBranchWhitelist.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Issue.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/HookTask.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Action.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/OrgUser.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/TeamRepo.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/IssueUser.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/IssueLabel.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/PullRequest.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/TwoFactor.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Attachment.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/PublicKey.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Watch.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Label.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Access.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Milestone.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Version.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/TeamUser.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/AccessToken.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Team.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Follow.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Comment.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/ProtectBranch.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Repository.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Release.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Mirror.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Star.json\r\nAdding file.../tmp/cae/gogs-backup-20180113232449.zip/gogs-backup/db/Webhook.json\r\n2018/01/13 23:25:08 [ INFO] Backup succeed! Archive is located at: /home/git/backupgogs/gogs-backup-20180113232449.zip\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/377887179","html_url":"https://github.com/gogits/gogs/issues/4991#issuecomment-377887179","issue_url":"https://api.github.com/repos/gogits/gogs/issues/4991","id":377887179,"user":{"login":"FGM","id":143311,"avatar_url":"https://avatars2.githubusercontent.com/u/143311?v=4","gravatar_id":"","url":"https://api.github.com/users/FGM","html_url":"https://github.com/FGM","followers_url":"https://api.github.com/users/FGM/followers","following_url":"https://api.github.com/users/FGM/following{/other_user}","gists_url":"https://api.github.com/users/FGM/gists{/gist_id}","starred_url":"https://api.github.com/users/FGM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FGM/subscriptions","organizations_url":"https://api.github.com/users/FGM/orgs","repos_url":"https://api.github.com/users/FGM/repos","events_url":"https://api.github.com/users/FGM/events{/privacy}","received_events_url":"https://api.github.com/users/FGM/received_events","type":"User","site_admin":false},"created_at":"2018-04-02T08:48:32Z","updated_at":"2018-04-02T08:48:32Z","author_association":"NONE","body":"More details in my case with 0.11.34.1122 from packager.io on Ubuntu 16.04.4 LTS:\r\n\r\n* using `sudo su gogs` originally logged as default user `ubuntu`\r\n* Command: `/opt/gogs/gogs backup -c /etc/gogs/conf/app.ini -v --target ~/backups --exclude-repos`\r\n* failure because `/opt/gogs/custom` does not exist. \r\n  * Weak fix: just `mkdir /opt/gogs/custom` : but then your config is not included in the backup\r\n  * Apparently better fix: `ln -s /etc/gogs /opt/gogs/custom` : this will allow the config directory to be backed up\r\n* If the command is run from `/opt/gogs`, the above backup command works after the symlink has been added\r\n* _But_ if it is run from the default login directory (`/home/ubuntu`), it appears to work, but skips the data directory, missing avatars and attachments (but including custom and db)"}}
{"actor":{"display_login":"FGM"}}