Giter Club home page Giter Club logo

backupy's People

Contributors

elesiuta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

backupy's Issues

symlink support

backupy is a really neat utility, we really would like to use it, especially for our data management on Windows.

The complete blocker for us is that it does not support symlinks (in the way, e.g. robocopy on Windows or cp on Linux routinely do). On Linux, backupy copies the target of a symlink rather than the symlink itself, which also is a blocker for us.

(It is really convenient to use relative symlinks in some types of data and we use lots of them.)

It would be great to have symlink support in backupy - simply back them up verbatim; does not seem to be a large feature.

Option request: remove color tag in CLI output

Thank you for managing this useful backup tool.

When I run the backupy on windows command prompt, the color tags are not properly displayed. This is because the color tags such as [94m, [0m, and [95m are not supported in windows command prompt. Some users (like me) who want to save the output into the file will face the same problem even in the Mac and Linux. Therefore, I'd like to suggest adding an option named for example nocolor to remove color tags from stdout. My backupy version and a minimal example follow:

Version:

$ pip freeze | grep BackuPy
BackuPy==1.8.2

Sample command:

mkdir srcdir dstdir; touch srcdir/test01.txt; backupy --noprompt srcdir dstdir > out.log

The contents of out.log:

�[94mScanning files on source:
MYTESTDIR/srcdir�[0m
Scanning 0/1:                                                                 
Scanning 1/1: test01.txt                                                      
Scanning completed!                                                           
�[94mScanning files on destination:
MYTESTDIR/dstdir�[0m
Scanning 0/0:                                                                 
Scanning completed!                                                           
�[94mComparing directories...�[0m
�[95mSource Only (will be copied to dest): 1 (0 B)�[0m
�[94mFile: �[0mtest01.txt
�[94m�[0m            �[94m Size: �[0m0 B       �[94m Modified: �[0mSun Sep 20 21:03:18 2020
�[95mDestination Only (will be archived): 0 (0 B)�[0m
�[95mChanged Files (archive dest and copy source -> dest): 0 (0 B)�[0m
�[95mMoved Files (will move files on dest to match source): 0 (0 B)�[0m
�[95mStarting mirror�[0m
�[94mCopying 1 unique files from:
MYTESTDIR/srcdir
to:
MYTESTDIR/dstdir�[0m
Copying 0/1:                                                                  
Copying 1/1: test01.txt                                                       
File operations completed!                                                    
�[92mCompleted!�[0m

If possible, the <0x1b> Esc character is preferred to be removed.

Best regard,

backupy fail

root@vm-201:/tmp# sudo backupy / /tmp/ --dry-run
Dry Run
Scanning files on source:
/
Traceback (most recent call last):
File "/snap/backupy/485/bin/backupy", line 33, in
sys.exit(load_entry_point('BackuPy==1.8.6', 'console_scripts', 'backupy')())
File "/snap/backupy/485/lib/python3.6/site-packages/backupy/cli.py", line 124, in main
return backup_manager.run()
File "/snap/backupy/485/lib/python3.6/site-packages/backupy/backupman.py", line 287, in run
self.source.scanDir(self.config.stdout_status_bar)
File "/snap/backupy/485/lib/python3.6/site-packages/backupy/dirinfo.py", line 215, in scanDir
if len(os.listdir(full_path)) == 0:
PermissionError: [Errno 13] Permission denied: '/bin'

Clean up Trash and Archives

Would it be possible to clear the trash and archive folders after a specified number of days to keep them from growing indefinitely? I still like having the safety net that the trash and archives provide, so I'd rather not enable the "--noarchive" option.

Support of regex

Regex doesn't seem to work with all regex pattern matching operators. I want to exclude directories that contain python virtual environments which have a variety of names. something like /_env/ works but not the /[^.]_env/ below... I want to match on all characters except for a dot (.) in directory names: https://regex101.com/r/kpYkVr/1

backupy ~/dev /Volumes/exFAT-1TB/backups/dev --fe /node_modules/ /[^.]_env/ /amplify/

Any help is appreciated. Thanks!

copy fails if there is an error reading the destination folder

In my disk G:\ there is a folder unreadable, so I got:

G:\casa_mussin
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Mauro\backupy.exe\__main__.py", line 7, in <module>
  File "C:\Users\Mauro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\backupy\cli.py", line 128, in main
    return backup_manager.run()
  File "C:\Users\Mauro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\backupy\backupman.py", line 315, in run
    self.dest.scanDir(self.config.stdout_status_bar)
  File "C:\Users\Mauro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\backupy\dirinfo.py", line 216, in scanDir
    if len(os.listdir(full_path)) == 0:
OSError: [WinError 1392] La directory o il file è danneggiato e illeggibile: 'G:\\casa_mussin\\_X'
PS C:\Users\Mauro>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.