Skip to content

Commit 55aa562

Browse files
committed
added documents
1 parent ba92284 commit 55aa562

File tree

6 files changed

+49
-3
lines changed

6 files changed

+49
-3
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,47 @@
11
# mmd-gitlab-backuper
2+
3+
A command line package to backup your repositories in your local from Gitlab. Because of U.S Sanctions there is high risk without any backup.
4+
5+
### Requirements:
6+
7+
- node js v10 above
8+
9+
### How to work:
10+
11+
- grab a Personal Access Token from your gitlab account.
12+
13+
Login on your gitlab account and click on your avatar on top right. Click on `Settings` and from the left sidebar click on `Access Tokens`:
14+
15+
Full url for gitlab.com: [https://gitlab.com/profile/personal_access_tokens](https://gitlab.com/profile/personal_access_tokens)
16+
17+
Please tik the fields like in the picture
18+
19+
Also provide a name for this token. something like `backup-token`.
20+
21+
![doc1](images/doc1.jpg)
22+
23+
Click on `Create personal access token` and after that grab your token:
24+
25+
![doc2](images/doc2.jpg)
26+
27+
- now run command below in witch directory you want to do backup:
28+
`npx mmd-gitlab-backuper -t 'YOUR-ACCESS-TOKEN'`
29+
30+
wooow!! that's all. Now your repos will be available in `./repos` directory.
31+
32+
### Options:
33+
34+
See options by `npx mmd-gitlab-backuper --help`:
35+
36+
```
37+
Options:
38+
--version Show version number [boolean]
39+
-t, --token your Gitlab Personal Access Token [string]
40+
-o, --output Backup to output directory, defaults to ./repos [string]
41+
-u, --url Specify Gitlab URL, defaults to https://gitlab.com [string]
42+
--help Show help [boolean]
43+
```
44+
45+
for example you can change default backup directory like this:
46+
47+
`npx mmd-gitlab-backuper -t 'YOUR-ACCESS-TOKEN' -o './gitlab-repo'`

images/doc1.jpg

143 KB
Loading

images/doc2.jpg

49.7 KB
Loading

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const cliProgress = require("cli-progress");
99
const argv = require("yargs");
1010

1111
argv
12-
.usage("Save your repo in gitlab")
12+
.usage("Backup gitlab repo in local machine")
1313
.option("token", {
1414
alias: "t",
1515
type: "string",

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mmd-gitlab-backuper",
33
"description": "a package to backup from all projects that you have on gitlab",
4-
"version": "0.8.5",
4+
"version": "1.0.0",
55
"main": "index.js",
66
"license": "MIT",
77
"author": {

0 commit comments

Comments
 (0)