https://github.com/sepppenner/raspberrypibackupclient
RaspberryPiBackupClient is a project to backup certain directories from your Raspberry Pi to a WebDav server. The script was written and tested in Python 3.
https://github.com/sepppenner/raspberrypibackupclient
Last synced: about 1 year ago
JSON representation
RaspberryPiBackupClient is a project to backup certain directories from your Raspberry Pi to a WebDav server. The script was written and tested in Python 3.
- Host: GitHub
- URL: https://github.com/sepppenner/raspberrypibackupclient
- Owner: SeppPenner
- License: mit
- Created: 2018-10-12T18:57:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T11:23:24.000Z (about 2 years ago)
- Last Synced: 2025-04-02T00:24:36.706Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: License.txt
Awesome Lists containing this project
README
RaspberryPiBackupClient
====================================
RaspberryPiBackupClient is a project to backup certain directories from your Raspberry Pi to a WebDav server. The script was written and tested in Python 3.
[](https://ci.appveyor.com/project/SeppPenner/raspberrypibackupclient)
[](https://github.com/SeppPenner/RaspberryPiBackupClient/issues)
[](https://github.com/SeppPenner/RaspberryPiBackupClient/network)
[](https://github.com/SeppPenner/RaspberryPiBackupClient/stargazers)
[](https://raw.githubusercontent.com/SeppPenner/RaspberryPiBackupClient/master/License.txt)
[](https://snyk.io/test/github/SeppPenner/RaspberryPiBackupClient)
# Steps to use this project:
1. Make sure to install Python and Pip correctly
2. Set the execute flags:
```bash
chmod +x install.sh
chmod +x run.sh
chmod +x backup.py
```
3. Install all required pip package dependencies with:
```bash
pip install -r requirements.txt
```
4. Setup a WebDav server and create a folder to be accessible from the script.
5. Adjust your settings in the [backup.py](https://github.com/SeppPenner/RaspberryPiBackupClient/blob/master/backup.py) file:
```python
language = lang.Lang('english') # Valid ones are currently 'german' and 'english'
folders = {'examplefolder': '/var/lib/example', 'examplefolder2':'/etc/example/'}
webdavroot = 'https://someurl.com/backup/'
webdavuser = "user"
webdavpassword = "password"
```
6. Run the backup client in a cronjob, e.g.
```bash
0 6 1 * * /usr/bin/python3 /home/something/backup.py
```
to run it on each first day of the month at 6 o'clock in the morning.
7. If you do not use a self signed certificate, disable the following line
```python
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
```
# For more information see:
* https://www.quora.com/How-do-I-zip-directories-in-Python
* https://stackoverflow.com/questions/36216274/uploading-a-0-bytes-file-to-owncloud-with-python-requests-hangs
* https://crontab.guru/#0_6_1_*_*
Change history
--------------
See the [Changelog](https://github.com/SeppPenner/RaspberryPiBackupClient/blob/master/Changelog.md).