Properly clean a Nextcloud user with S3 storage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Florian Charlaix 7d4d1ac3fe Use Nextcloud configuration DB prefix 3 years ago
README.md Initial commit 3 years ago
clean_s3_user.py Use Nextcloud configuration DB prefix 3 years ago
requirements.txt Initial commit 3 years ago

README.md

Clean S3 user

Properly clean a Nextcloud user with S3 storage

Installation

apt install libmariadb3 libmariadb-dev
pip3 install -r requirements.txt

Usage

  • On the Nextcloud host
# One user immediate deletion
python3 clean_s3_user.py -p /opt/nextcloud -u test@sitiv.fr
# One user with delayed S3 deletion
python3 clean_s3_user.py -p /opt/nextcloud -u test@sitiv.fr -b cache.csv
# One user transfer
python3 clean_s3_user.py -p /opt/nextcloud -u test@sitiv.fr -d admin@sitiv.fr
# Mass user deletion with exception
python3 clean_s3_user.py -p /opt/nextcloud --all -e odsiadmin -e supervision -e watcha
# Enable debug
python3 clean_s3_user.py -p /opt/nextcloud [...] -v
# Save log to file
python3 clean_s3_user.py -p /opt/nextcloud [...] -l clean.log
# Full example
python3  clean_s3_user.py -p /opt/nextcloud --all -e odsiadmin -e supervision -e watcha -l clean.log -v