Backup and restore for linux
Project description
Backup and restore for linux
This library is targeting to help writing backup, restoration and configuration scripts with minimum effort.
Example Usages
Backing up folders or files
from linuxbackup import * folder(['/var/www','/var/log']) folder('/home/ubuntu/test',owner='ubuntu:ubuntu',permission='777')
Execute the script with argument backup or restore
python3 example.py backup
sudo python3 example.py restore
Executing shell
sh(cmd,check)
is the same as subprocess.run(cmd,shell=True,check=check)
shr
is the same as sh
except it only runs in RESTORE
sh('./test.sh') shr('curl https://get.acme.sh | sh')
Editing php.ini
php=IniEditor('/etc/php/7.2/apache2/php.ini') php['PHP']['upload_max_filesize']='20M' php.write() #only executed in RESTORE mode
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size linuxbackup-0.0.1-py3-none-any.whl (2.8 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size linuxbackup-0.0.1.tar.gz (2.3 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for linuxbackup-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 752d4774d1a48dffedc56a39499fc1d925fd177f2ec202774926056d61fc6d6c |
|
MD5 | 4d82e1bf8391288fa490c19682fc389c |
|
BLAKE2-256 | 8ff774b0e50ade0fe941afc902fb08bf8aac38ba18908e05fba93eef58fad646 |