diff --git a/Dockerfile b/Dockerfile index 7cbb7ca..854c32f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM python:alpine3.18 -RUN apk add --no-cache mariadb-client rclone supercronic docker restic +RUN apk add --no-cache mariadb-client rclone supercronic docker restic zip COPY . opt RUN chmod +x /opt/entrypoint.sh RUN chmod +x /opt/restic.sh diff --git a/seafile-backup.py b/seafile-backup.py index cc5173d..e4ef8ab 100644 --- a/seafile-backup.py +++ b/seafile-backup.py @@ -79,7 +79,7 @@ apprise_body = os.getenv("apprise_body") # Stop seafile and seafile hub if docker_command: - os.system(f'docker exec {container_name} /opt/seafile/seafile-server-latest/seahub.sh stop') + os.system(f'docker exec {container_name} /opt/seafile/seafile-serverlatest/seahub.sh stop') os.system(f'docker exec {container_name} /opt/seafile/seafile-server-latest/seafile.sh stop') # Dump the databases @@ -106,12 +106,12 @@ if rclone_push: # Remote restic backup if restic_push: - os.system("./restic.sh") + os.system("/opt/restic.sh") # Start seafile and seafile hub if docker_command: - os.system(f'docker exec {container_name} /opt/seafile/seafile-server-latest/seahub.sh start') os.system(f'docker exec {container_name} /opt/seafile/seafile-server-latest/seafile.sh start') + os.system(f'docker exec {container_name} /opt/seafile/seafile-server-latest/seahub.sh start') # compress db files if zip_db_files: @@ -125,8 +125,7 @@ if offload_db_files: # cleanup if cleanup: os.system(f'rm {db_dump_tmp_path}*sfdb_*') - os.system(f'Rclone delete -P \ - {rclone_db_retention} {rclone_remote}:{rclone_remote_db_path}') + os.system(f'rclone delete -P {rclone_db_retention} {rclone_remote}:{rclone_remote_db_path}') # healthcheck if healthcheck: