To moderators: Pls move to another section, if here is not the right place for my post. (My english is terrible)
Original in german:
Nicht nur lahm, sondern ist auch die WebGui grottenschlecht und kein FTP oder Webdav.
Allerdings günstig (9€/Jahr für 100GB).
Fragte mich, was ich damit machen könnte.
Für automatische Backups ist der Space aber ideal.
Meine Idee:
Ich backuppe mein Forum in den sonst nutzlosen Speicher.
Habe mir ein rclone installiert. Man siehe:
Und apt-get install p7zip-full installiert.
Mit 7z haben wir am Schluss gepackte, passwortgeschützte Dateien auf dem HubiC.
Meine Scripts (Rechte 700):
backupdb.sh
backuphttpdocs.sh
Ich fahre ein EHCP force. Darum ist mein Forum-root im Verzeichnis httpdocs.
Wobei DBpasswort und 12345 anzupassen sind.
Den backupuser habe ich nach https://oprtr.org/sicheres-backup-von-mysql-datenbanken-mit-cronjob/ angelegt.
rclone Befehl:
rclone copy /home/backup remote:mein_backup
Nun noch der Cronjob:
als root eingeben: crontab -e
Man sieht hier, dass ich die Scripts in /home und die Backups in /home/backup habe.
Den Forum-root (httpdocs) backuppe ich alle Monate, die Datenbank jede Nacht.
Translator:
Not only lame, but also the WebGui is terrible and not an FTP or Webdav.
However, cheap (9 € / year for 100GB).
Wondered what I could do with it.
The space is ideal for automatic backups.
My idea:
I back up my forum into the otherwise useless memory.
I installed an rclone. See:
And apt-get install p7zip-full installed.
With 7z, we finally have packed, password-protected files on the HubiC.
My scripts (rights 700):
backupdb.sh
backuphttpdocs.sh
Now the cronjob:
Enter as root: crontab -e
You can see here that I have the scripts in / home and the backups in / home / backup.
I back up the forum root (httpdocs) every month, the database every night.
Original in german:
Nicht nur lahm, sondern ist auch die WebGui grottenschlecht und kein FTP oder Webdav.
Allerdings günstig (9€/Jahr für 100GB).
Fragte mich, was ich damit machen könnte.
Für automatische Backups ist der Space aber ideal.
Meine Idee:
Ich backuppe mein Forum in den sonst nutzlosen Speicher.
Habe mir ein rclone installiert. Man siehe:
Code:
To install rclone on Linux/macOS/BSD systems, run:
curl https://rclone.org/install.sh | sudo bash
For beta installation, run:
curl https://rclone.org/install.sh | sudo bash -s beta
rclone config
siehe dazu: https://rclone.org/hubic/
neue token holen (für server ohne GUI):
siehe: https://rclone.org/remote_setup/
dies lokal auf einem Linux PC ausführen. Die token ist dann in /home/DuAlsUser/.config/rclone
Mit 7z haben wir am Schluss gepackte, passwortgeschützte Dateien auf dem HubiC.
Meine Scripts (Rechte 700):
backupdb.sh
Code:
#!/bin/bash
DATE=$(date +%d.%m.%Y-%H.%M)
cd /home/backup/
mysqldump -u backupuser -p'DBpasswort' --all-databases > /home/backup/forum-"$DATE".sql
sleep 5
7z a -t7z -mx=9 -p12345 forum-"$DATE".7z forum-"$DATE".sql
rm forum-"$DATE".sql
rclone copy /home/backup hubic:backup_verzeichnis_aufhubic
rm forum-"$DATE".7z
backuphttpdocs.sh
Code:
#!/bin/bash
DATE=$(date +%d.%m.%Y-%H.%M)
cd /var/www/zum_forumroot/httpdocs
tar -cf /home/backup/httpdocs-"$DATE".tar *
sleep 5
cd /home/backup
7z a -t7z -mx=9 -p12345 httpdocs-"$DATE".7z httpdocs-"$DATE".tar
rm httpdocs-"$DATE".tar
rclone copy /home/backup hubic:backup_verzeichnis_aufhubic
rm httpdocs-"$DATE".7z
Wobei DBpasswort und 12345 anzupassen sind.
Den backupuser habe ich nach https://oprtr.org/sicheres-backup-von-mysql-datenbanken-mit-cronjob/ angelegt.
rclone Befehl:
rclone copy /home/backup remote:mein_backup
Nun noch der Cronjob:
als root eingeben: crontab -e
Code:
0 2 * * * /home/backupdb.sh > /dev/null 2>&1
0 3 1 * * /home/backuphttpdocs.sh > /dev/null 2>&1
Den Forum-root (httpdocs) backuppe ich alle Monate, die Datenbank jede Nacht.
Translator:
Not only lame, but also the WebGui is terrible and not an FTP or Webdav.
However, cheap (9 € / year for 100GB).
Wondered what I could do with it.
The space is ideal for automatic backups.
My idea:
I back up my forum into the otherwise useless memory.
I installed an rclone. See:
Code:
To install rclone on Linux / macOS / BSD systems, run:
curl https://rclone.org/install.sh | sudo bash
For beta installation, run:
curl https://rclone.org/install.sh | sudo bash -s beta
rclone config
see: https://rclone.org/hubic/
get new token (for servers without GUI):
see: https://rclone.org/remote_setup/
do this locally on a Linux PC. The token is then in /home/DuAlsUser/.config/rclone
With 7z, we finally have packed, password-protected files on the HubiC.
My scripts (rights 700):
backupdb.sh
Code:
#! / Bin / bash
DATE = $ (date +% d.% M.% Y-% H.% M)
cd / home / backup /
mysqldump -u backupuser -p'DBpasswort '--all-databases> /home/backup/forum-"$DATE".sql
sleep 5
7z a -t7z -mx = 9 -p12345 forum - "$ DATE" .7z forum - "$ DATE" .sql
rm forum - "$ DATE" .sql
rclone copy / home / backup hubic: backup_directory_aufhubic
rm forum - "$ DATE" .7z
backuphttpdocs.sh
Code:
#! / Bin / bash
DATE = $ (date +% d.% M.% Y-% H.% M)
cd / var / www / zum_forumroot / httpdocs
tar -cf /home/backup/httpdocs-"$DATE".tar *
sleep 5
cd / home / backup
7z a -t7z -mx = 9 -p12345 httpdocs - "$ DATE" .7z httpdocs - "$ DATE" .tar
rm httpdocs - "$ DATE" .tar
rclone copy / home / backup hubic: backup_directory_aufhubic
rm httpdocs - "$ DATE" .7z [/ CODE]
I drive an EHCP force. That is why my forum root is in the httpdocs directory.
Whereby [B] DBpasswort [/ B] and [B] 12345 [/ B] have to be adjusted.
I created the backupuser after [URL] https://oprtr.org/icheres-backup-von-mysql-datenbanken-mit-cronjob/ [/ URL].
rclone command:
rclone copy / home / backup remote: my_backup
Now the cronjob:
Enter as root: crontab -e
Code:
0 2 * * * /home/backupdb.sh > /dev/null 2>&1
0 3 1 * * /home/backuphttpdocs.sh > /dev/null 2>&1
I back up the forum root (httpdocs) every month, the database every night.
Last edited: