Download the PHP package thesaturn/c14-backup-tool without Composer
On this page you can find all versions of the php package thesaturn/c14-backup-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thesaturn/c14-backup-tool
More information about thesaturn/c14-backup-tool
Files in thesaturn/c14-backup-tool
Package c14-backup-tool
Short Description Backup tool for cheap C14 storage provided by online.net. Support encryption, diff backups and backup rotation. Description about storage https://www.online.net/en/c14
License MIT
Informations about the package c14-backup-tool
C14 Backup Tool
Backup tool for cheap C14 storage provided by online.net. Support encryption, diff backups and backup rotation. Description and prices here: https://www.online.net/en/c14.
Inspired by BackInTime
Features
- Multi profile configuration
- Exclude folders and files
- Client-side encryption
- Backup rotations
Requirements
PHP >= 5.6
rsync
encfs (+encfstools)
sshfs
ssh
ssh-keygen
Optional dependence
cron
composer
fabiang/xmpp
Installation
Without xmpp logs and composer
If you want get logs by xmpp:
Terminology
C14 — Storage type
Safe — Name of archives group in C14
Archive — Contains your files
Configuring
All possible options described in config.example.php
. Below some tips
config.php
must return array with profilesreturn [...]
-
Every profile has its name
- All paths must be absolute to avoid possible errors
Usage
Command line usage: php /path/to/main.php profileName
- Register to online.net
- Add your debit/credit card
- Generate ssh keys (if you don't have them)
ssh-keygen
- Edit config.php as you like
- Test your configuration
- Add backup tool to cron
- Time to time look through archives in safe lists to check size of archives
Notices
- Diff backups created only in one archive. So you can always delete any archive without corrupting others
- Storage API is a quite slow and not stable. That is why code try several times to do operations and have sleep() function to wait, while operations will be applied.
- Archive creates for 7 days, but tool make backups only for 6 days since archive created.
- Encfs config file also copied to archive. So you don't need to save it somewhere else.
- If all rotation options is to false, all backups will be saved.
- If encryption enabled, exclude working with only absolute paths, regex is not available
Not implemented yet
- Better config validation
- Dependencies checking
- Tests
Algorithm
- Send a message about backup starting "Backup started for safe"
- Find a safe with safe name (set up in config)
- Find an archive in the safe to store backups
- Create necessary folders
- Mount encfs (encrypted view of the root FS)
- Encrypt included and excluded file names (for rsync)
- Mount the archive (sshfs)
- Clean up backup_temp folder (if last backup was unsuccessful)
- Copy hard links from the last backup folder
- Send the message "YAY! The real backuping is starting!"
- rsync
- rename backup_temp to C14ABT/$date
- Write date of successful backup to description of the archive
- Send "Backup success."
- Unmount sshfs and encfs