Compare commits

..

2 commits

Author SHA1 Message Date
Robin Kloppe 1e2055ec9a typo 2024-04-30 21:00:24 +02:00
Robin Kloppe c5f72997f8 static passphrase 2024-04-30 20:57:57 +02:00
2 changed files with 37 additions and 6 deletions

View file

@ -1,3 +1,26 @@
# Github discontinued Froxlorbackup
This project may not have latest commits as newer commits will not be published at github. =============
Find latest development at [git.mainboarder.de](https://git.mainboarder.de/Public/Froxlorbackup).
Backup your Froxlor Webhosting (or anything else) to another server. Encrypted, via ssh.
Works for all versions.
0. install duplicity and all required packages
1. copy the script to the froxlorserver and run it as `/$PATH/backup-server.sh full`
2. Add a cronjob like `17 2 * * * /$PATH/backup-server.sh`
3. Let the magic happen
You can restore your data with
`duplicity -t nD --file-to-restore relative/neddedFile $EXTERNALPATH/TO//media/mount/duplicity/ /where/to/save/now`
| Parameter | Description|
| ------------- | ------------- |
| `-t nD` | The version from how much days in the past should be recovered? |
| `relative/neddedFile` | Where, relative from the next parameter is the file in the backup? |
| `$EXTERNALPATH/TO//media/mount/duplicity/` | Where are the duplicity-files stored on the external storage? |
| `/where/to/save/now` | Where should the recovered file saved to (must not exist)? |
Example:
`duplicity -t 8D --file-to-restore apache2/sites-available/site.conf ssh://backup@hostname2.domain.tld//home/hostname1/etc /home/user/site.conf`
If you execute this on the machine where you want to restore an eight days old `/etc/apache2/sites-available/site.conf` from the external machine `hostname2.domain.tld`, then the recovered file will be saved in `/home/user/site.conf`

View file

@ -51,8 +51,16 @@ LOGDIR='/var/log/duplicity' # must exist
# Setting the passphrase to encrypt the backup files. Will use symmetrical keys in this case. # Setting the passphrase to encrypt the backup files. Will use symmetrical keys in this case.
# Set one Password per Backup # Set one Password per Backup
PASSPHRASE=$(dd if=/dev/urandom 2>/dev/null | tr -cd '[:alnum:]' | fold -w21 | head -1) # Hint: generate a safe password: dd if=/dev/urandom 2>/dev/null | tr -cd '[:alnum:]' | fold -w21 | head -1
PASSPHRASE="none"
if [ $PASSPHRASE != "none" ]
then
export PASSPHRASE export PASSPHRASE
else
echo "Please set a passphrase in the script"
exit 1
fi
# encryption algorithm for gpg, disable for default (CAST5) # encryption algorithm for gpg, disable for default (CAST5)
# see available ones via 'gpg --version' # see available ones via 'gpg --version'