Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yaroslaff/storagebox-expire
Manage backups on remote storagebox (e.g. hetzner). Delete expired backups.
https://github.com/yaroslaff/storagebox-expire
Last synced: 5 days ago
JSON representation
Manage backups on remote storagebox (e.g. hetzner). Delete expired backups.
- Host: GitHub
- URL: https://github.com/yaroslaff/storagebox-expire
- Owner: yaroslaff
- License: mit
- Created: 2022-08-29T07:40:20.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-02T17:18:42.000Z (about 2 years ago)
- Last Synced: 2023-03-10T17:47:26.640Z (over 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# storagebox-expire
Manage backups on remote storagebox (e.g. hetzner). Delete expired backups.## List backups
~~~shell
$ storagebox-expire.py uNNNNNN.your-storagebox.de -p 23 -u uNNNNN --list
2022-08-29 16:50 started
Daily:
d5s-2022-08-29.tar.gz: d5s 2022-08-29 00:00:00
liste-2022-08-29.tar.gz: liste 2022-08-29 00:00:00
signal-2022-08-29.tar.gz: signal 2022-08-29 00:00:00Monthly:
d5s-2022-07-22.tar.gz: d5s 2022-07-22 00:00:00
liste-2022-08-29.tar.gz: liste 2022-08-29 00:00:00
signal-2022-08-29.tar.gz: signal 2022-08-29 00:00:00~~~
## Create monthly backups
~~~shell
$ storagebox-expire.py uNNNNNN.your-storagebox.de -p 23 -u uNNNNN --mkmonthly
2022-08-29 16:45 started
Daily:
d5s-2022-08-29.tar.gz: d5s 2022-08-29 00:00:00
liste-2022-08-29.tar.gz: liste 2022-08-29 00:00:00
signal-2022-08-29.tar.gz: signal 2022-08-29 00:00:00Monthly:
d5s-2022-07-22.tar.gz: d5s 2022-07-22 00:00:00
liste-2022-08-29.tar.gz: liste 2022-08-29 00:00:00UPDATE /home/daily/signal-2022-08-29.tar.gz /home/monthly
Copied 1 backups
~~~## Delete expired backups
~~~shell
$ storagebox-expire.py uNNNNNN.your-storagebox.de -p 23 -u uNNNNN --expire 35
2022-08-29 17:17 started
=== d5s
DELETE /home/daily/d5s-2022-07-21.tar.gz
DELETE /home/daily/d5s-2022-07-22.tar.gz
DELETE /home/daily/d5s-2022-07-23.tar.gz
DELETE /home/daily/d5s-2022-07-24.tar.gz
=== liste
DELETE /home/daily/liste-2022-07-20.tar.gz
DELETE /home/daily/liste-2022-07-21.tar.gz
DELETE /home/daily/liste-2022-07-22.tar.gz
DELETE /home/daily/liste-2022-07-23.tar.gz
DELETE /home/daily/liste-2022-07-24.tar.gz...
~~~## Cron
`/etc/cron.d/storagebox`:
~~~
5 8 * * * root /usr/local/bin/storagebox-expire.py uNNNNNN.your-storagebox.de -p 23 -u uNNNNNN --mkmonthly
10 8 * * * root /usr/local/bin/storagebox-expire.py uNNNNNN.your-storagebox.de -p 23 -u uNNNNNN --expire 30
~~~