Skip to content

Script to compress multiple dir/files and send them via ssh

License

Notifications You must be signed in to change notification settings

RavazziniAndrea/Compressore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compressore

A simple script to backup multiple directories and send them via ssh.

GitHub

How to Use - Dependencies - Problems - Credits

How to Use

To get started, you have to edit params.json:

  • folder_to_backup: list of folders to backup
  • tmp_store_folder: folder to store the temporarily the backup on the local pc
  • ssh
    • enable: 1/0 to enable/disable the ssh copy. If it's 0, the other parameters in ssh can be left empty ""
    • ip: ip address to the machine connected via ssh
    • port: ssh port (22 is the default)
    • user: user used to connect via ssh
    • folder: folder in which the backup is stored once sended
  • log
    • enable: 1/0 to enable/disable the logging to file. If it's 0, the other parameters in log can be left empty ""
    • folder: path to the folder in which it's written the .log file

after you have modified the parameters, simply launch compressore.py:

$ python compressore.py


Dependencies

  • Systems:
    • Linux
    • Mac Os
  • Packages:
    • python >= 3.0
    • tar
    • pbzip2
    • sshpass
    • scp


Problems

  • The logging to file still doesn't work with shell commands.
  • Right now this project works only on *nix systems. I'm currently developing a solution to make it work on Windows.
  • It's not the best python code you have ever seen, I apologize for that but I have a strong Java background 🤷, I will make it more "python friendly".
For any help, your pr are VERY apriciated! Thanks!


Credits

About

Script to compress multiple dir/files and send them via ssh

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages