Compare commits
3 Commits
7c6be07a94
...
main
Author | SHA1 | Date | |
---|---|---|---|
bd446f8f1e | |||
980be26a0d | |||
fb148c9e25 |
@@ -1,15 +1,4 @@
|
||||
cd ../private
|
||||
rm -rf gitea
|
||||
mkdir gitea
|
||||
scp -r server:/var/lib/gitea gitea
|
||||
scp server:/etc/gitea/app.ini gitea
|
||||
|
||||
|
||||
mkdir personal_website
|
||||
scp server:/root/personal_website/mydb.sqlite personal_website
|
||||
|
||||
mkdir vaultwarden
|
||||
scp server:/root/vaultwarden/db.sqlite3 vaultwarden
|
||||
scp server:/root/vaultwarden/rsa_key.pem vaultwarden
|
||||
ssh server /root/backup_script/script.sh
|
||||
scp server:/root/backup ../backup
|
||||
|
||||
|
||||
|
11
backup/script.sh
Executable file
11
backup/script.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
rm -rf /root/backup/
|
||||
mkdir /root/backup/
|
||||
zip -r /root/backup/calendars.zip /root/caldav/calendars/
|
||||
zip -r /root/backup/gitea.zip /var/lib/gitea
|
||||
cp /root/personal_website/mydb.sqlite /root/backup/mydb.sqlite
|
||||
cp /root/vaultwarden/db.sqlite3 /root/backup/db.sqlite3
|
||||
cp /etc/gitea/app.ini /root/backup/app.ini
|
||||
|
||||
|
||||
|
||||
|
24
files/my-caldav.service
Normal file
24
files/my-caldav.service
Normal file
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
# describe the app
|
||||
Description=My CalDav
|
||||
# start the app after the network is available
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
# usually you'll use 'simple'
|
||||
# one of https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=
|
||||
Type=simple
|
||||
# which user to use when starting the app
|
||||
User=root
|
||||
# path to your application's root directory
|
||||
WorkingDirectory=/root/caldav
|
||||
# the command to start the app
|
||||
# requires absolute paths
|
||||
ExecStart=/root/caldav/portable_python/bin/python /root/caldav/server.py
|
||||
# restart policy
|
||||
# one of {no|on-success|on-failure|on-abnormal|on-watchdog|on-abort|always}
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
# start the app automatically
|
||||
WantedBy=multi-user.target
|
16
scripts/17_caldav.sh
Normal file
16
scripts/17_caldav.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
cd ..
|
||||
cp files/my-caldav.service /etc/systemd/system/my-caldav.service
|
||||
mkdir /root/caldav
|
||||
cp private/caldav/calendars
|
||||
|
||||
cd /root
|
||||
wget https://git.petrovv.com/nikola/python_scripts/releases/download/current/caldav.tar.gz
|
||||
tar -xzf caldav.tar.gz
|
||||
rm caldav.tar.gz
|
||||
cd caldav
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable my-caldav
|
||||
systemctl start my-caldav
|
||||
|
Reference in New Issue
Block a user