rsync tmp
desimaniac edited this page Feb 19, 2019
·
1 revision
(work in progress)
Useful for migrating server to server.
-
Destination
-
Dependencies
-
Preinstall
-
Login as user
-
Setup and enable rsync server
sudo nano /etc/rsyncd.conf
Format:
[rsync_name] path = /path/to/backups/as/specified/in/local/destination/in/backup_config.yml comment = Backup folder uid = seed gid = seed read only = no list = yes
Example:
[backup] path = /home/seed/Backups/Cloudbox/Cloudbox comment = Backup folder uid = seed gid = seed read only = no list = yes
Start Rsync:
sudo systemctl start rsync
-
Create backup folder.
mkdir -p /home/seed/Backups/Cloudbox/Cloudbox
-
-
Source
-
Create SSH key
ssh-keygen
➜ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/seed/.ssh/id_rsa): Created directory '/home/seed/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/seed/.ssh/id_rsa. Your public key has been saved in /home/seed/.ssh/id_rsa.pub. The key fingerprint is: SHA256:PLaFOPjdddFV2ePo6hRnctslaeWEq9wLnbD89/rkkVE seed@mediaserver The key's randomart image is: +---[RSA 2048]----+ | .o oo| | .. o .. | | . . . . .E| | . * . o .o.| | . = S +=+*+o.| | . = * *O++oo| | . o o..o.+.| | .. ooo| | .. .+=| +----[SHA256]-----+
-
Send SSH key to Destination server.
ssh-copy-id -i ~/.ssh/id_rsa seed@ipaddress
Type in your password to confirm.
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/user/seed/.ssh/id_rsa.pub" Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'seed@newserveripaddress'" and check to make sure that only the key(s) you wanted were added.
-
Test rsync URL.
Format
rsync -rdt rsync://user@newserveripaddress/rsync_name
Example:
rsync -rdt rsync://seed@1.2.3.4/backup
-
Setup backup config.
backup_config.yml
Format:
rsync: enable: true destination: rsync://user@newserveripaddress/rsync_name
Example:
local: enable: false destination: /home/{{user}}/Backups/Cloudbox/Cloudbox rclone: enable: false destination: whatever rsync: enable: true destination: rsync://seed@1.2.3.4/backup
-
Run backup.
-
-
Destination
-
Verify local backup folder has backup tarballs.
-
Run restore
-
- Overview
- Presumptions
- Server
- Domain Name
- Cloudflare
- Cloud Storage
- Plex / Emby - Account
- Usenet vs. BitTorrent
Cloudbox
- Overview
- Dependencies (Choose only one of these)
- Settings
- Preinstall (Choose only one of these)
- SSH
- Ansible Vault
- Rclone
- Cloudbox (Choose only one of these)
- Application Setup
- Next Steps
Feederbox (do this first)
- Overview
- Dependencies
- Settings
- Preinstall
- SSH
- Ansible Vault
- Rclone
- Feederbox (Choose only one of these)
- Application Setup
- Next Steps
Mediabox
- Overview
- Dependencies
- Settings
- Preinstall
- SSH
- Ansible Vault
- Rclone
- Mediabox (Choose only one of these)
- Application Setup
- Next Steps
- Cloudplow (Media Uploader)
- cb utility script (Develop branch only}
- Updating Cloudbox (Choose only one of these)
- Updating Cloudbox Apps
- Removing Cloudbox Apps
- Resetting Cloudbox Apps
- Migrating Cloudbox
- Settings Updater
- Ansible Vault Primer
- Plex Access Token
- Plex Autoscan Extras
- Pushover
- Google Drive API Client ID and Client Secret
- Useful Docker Commands
- Add Your Own Docker Container into Cloudbox
- Revoking SSL Certificates
- Feeder Mount
- Adding a Subdomain
- HTTP Auth Support
- Emby
- Nextcloud
- Resilio Sync
- Plex DupeFinder
- Heimdall
- NZBHydra v1
- Plex Requests
- Sickbeard MP4 Automator
- SABnzbd
- Traktarr
See Community Wiki.