backup
Backup
Backup your files using borg with different intervals and destinations.
Example output
DESTINATION: wd
home UP TO DATE (0 days ago at 2016-02-12 18:00)
system UP TO DATE (0 weeks ago at 2016-02-10 15:28)
media UP TO DATE (0 weeks ago at 2016-02-10 15:29)
DESTINATION: jokke (remote)
home needs backup (never executed)
system needs backup (never executed)
'home' (jokke) backup started
VPN connection already established
Connected to jokke-backup
[Borg output...]
'system' (jokke) backup started
VPN connection already established
Connected to jokke-backup
[Borg output...]
Don't forget to unmount!
Requirements
- Ruby
- Gem colorize (optional)
borgpassopenvpnnotify-sendon remote backup server
Installation
- Clone this repo to
/tmp - Install
borg - Install
pass - Install
openvpn - Install gem:
gem install colorize - Copy
backupandbackup_lib.rbto a directory which is added to$PATH - For remote backups: Install
borgon remote machine and addmessage_pongto$PATHfor notifications about backup process - Change
BackupLib::HOMEinbackup_lib.rbto your home path. Don't $HOME, because of running with sudo - Copy
config.yamlto/etc/borg/config.yaml - Make changes in
/etc/borg/config.yaml - Add pass file
encryption/backupviapass generate encryption/backup mkdir /backup- Copy
pre_backup.shto/backup/pre_backup.shand make changes - For remote backups: Configure remote destination in
$HOME/.ssh/config
# Backup with borg
# Start VPN /etc/openvpn/jokke.conf first
Host jokke-backup
User dsiw
HostName <ip>
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 22
# seconds
ConnectTimeout 3
I recommend using ssh-agent and gpg-agent.
First backup
- Show your current password via
echo $(pass show encryption/backup) - Init all your repositories via
borg init ... $YOUR_BACKUP_DESTINATION_FOLDER_FROM_CONFIG/home - Start
backup -n
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Repository
backup
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- over 7 years ago
- June 5, 2018
License
Links
Synced at
Thu, 06 Nov 2025 12:32:06 GMT
Languages