Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dev-guide
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
dev-guide
Commits
96523eb7
Commit
96523eb7
authored
Dec 31, 2014
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add rsync backup guide
parent
e3900aa9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
.gitignore
+1
-0
server/rsync-backup.md
+35
-0
No files found.
.gitignore
View file @
96523eb7
/*.swp
server/rsync-backup.md
0 → 100644
View file @
96523eb7
# About this guide
This guide is for backing file to remote server by using rsync + ssh
# Setup remote server for backup
## Generate SSH key
```
$ ssh-keygen -f ~/.ssh/id_rsa -q -P ""
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLVDBIpdpfePg/a6h8au1HTKPPrg8wuTrjdh0QFVPpTI4KHctf6/FGg1NOgM++hrDlbrDVStKn/b3Mu65//tuvY5SG9sR4vrINCSQF++a+YRTGU6Sn4ltKpyj3usHERvBndtFXoDxsYKRCtPfgm1BGTBpoSl2A7lrwnmVSg+u11FOa1xSZ393aaBFDSeX8GlJf1SojWYIAbE25Xe3z5L232vZ5acC2PJkvKctzvUttJCP91gbNe5FSwDolE44diYbNYqEtvq2Jt8x45YzgFSVKf6ffnPwnUDwhtvc2f317TKx9l2Eq4aWqXTOMiPFA5ZRM/CF0IJCqeXG6s+qVfRjB root@cloudads
```
Copy this key to your clipboard and login to your destination server.
Place this SSH key into your ~/.ssh/authorized_keys file:
If your SSH folder does not exist, create it manually:
```
mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0644 ~/.ssh/authorized_keys
```
## Run rsync to copy file
```
$ rsync -avz --ignore-existing -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /root/bigfile.txt ventura@192.168.1.2:/
```
There are many options of rsync, so please read document to set options suit you.
# Reference links
https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh
http://linoxide.com/how-tos/rsync-copy/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment