2023-05-07 16:34:52 +02:00
|
|
|
# simple file mover by jenz
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
# general compression: XZ_OPT='-T3 --memlimit-compress=70%' tar -cJf <name of compressed file> <Path to compress>
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
# general decompression: tar -xJf file.pkg.tar.xz
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## virtualenv venv
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## source venv/bin/activate
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## pip3 install -r requirements.txt
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## config file: server specifics
|
|
|
|
|
|
|
|
|
|
|
|
## requires an ~/.my.cnf with
|
2021-11-02 21:36:38 +01:00
|
|
|
|
|
|
|
[mysqldump]
|
|
|
|
host=""
|
|
|
|
user=""
|
|
|
|
password=""
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## python3 file_mover.py config.json
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## systemctl enable file_mover.timer
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## systemctl start file_mover.timer
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## logging: journalctl -f -u file_mover.service
|
2021-10-28 22:45:30 +02:00
|
|
|
|
2023-05-07 16:34:52 +02:00
|
|
|
## logging: systemctl status file_mover.service
|
2021-10-28 22:45:30 +02:00
|
|
|
|