|Luna f34dcc0319 first commit||9 months ago|
|backups||9 months ago|
|scripts||9 months ago|
|.gitignore||9 months ago|
|README.md||9 months ago|
|backup-all.sh||9 months ago|
Multi-server incremental backup script with no remote footprint.
Requires git. Note: the backup-all.sh script will automatically install rsync and duplicity when needed.
cd WHERE_YOU_WANT_TO_DOWNLOAD_IT git clone https://code.can-i.help/luna/luna-nofootprint-incremental-backups backups cd backups
If you don’t have an SSH connection already configured for your server in your
~/.ssh/config, add the following block to it:
Host YOUR_SERVER_ID Hostname THE_IP_OF_YOUR_SERVER User root Port 22 IdentityFile /home/YOUR_UNIX_USER/.ssh/YOUR_SERVER_IDENTITY_FILE
Save and test entering
ssh YOUR_SERVER_ID. If you login without entering credentials, you’re done for this step.
Then, to configure the server backup, do the following:
mkdir backups/YOUR_SERVER_ID cp backups/.env.template backups/YOUR_SERVER_ID/.env $EDITOR backups/YOUR_SERVER_ID/.env # replace at least the value of SSH_HOST and save.
You can optionally drop backup-prepare.sh script files inside any folder of $REMOTE_FOLDER, for them to be executed before any backup. You can also use .backupignore files (using the .gitignore syntaxis) to avoid backing up some files and folders.
Files will be downloaded to
backups/EACH_SERVER_ID/last and incremental may be generated at
To automate it, run
crontab -e and add the same command (with an absolute path) following the cron syntaxis, and save. You’re done.
Copyright 2019 firstname.lastname@example.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.