Giter VIP home page Giter VIP logo

django-rotating-backup's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

natureshadow

django-rotating-backup's Issues

[Security] Passes PostgreSQL password on command-line, leaking

https://github.com/erikdewildt/django-rotating-backup/blob/develop/django_rotating_backup/backup.py#L151

Here, the PostgreSQL password is passed on the command line of the sh command, in order to get it into the environment of pg_dump.

This is a security issue, because command lines of running processes are world-readbale to anyone who has access to the system (regular shell users as well as attackers who get as far as calling ps ax).

Never do this, it is one of the most discouraged anti-patterns. Actually, this is the one reason why the PGPASSWORD environment variable was introduced โ€” to stop people from passing their password on the command-line!

Can't backup MySQL db

When I try to back up a MySQL database I get this warning logged.
Database 'default' is not supported as the type is 'mysql'

From what I can see in backup.py it seems only SQLite and PostgreSQL are supported.

My backup settings are:

DRB_ENABLE_SQLITE_BACKUP_COPY = False
DRB_ENABLE_DATABASE_DUMPS = True
DRB_ENABLE_MEDIA_BACKUPS = False
DRB_ENABLE_REMOTE_SYNC = False

PermissionError: [Errno 13] Permission denied: '/.DocumentRevisions-V100'

When I run the backup I get the following error:

Traceback (most recent call last): File "./manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django/core/management/base.py", line 316, in run_from_argv self.execute(*args, **cmd_options) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django/core/management/base.py", line 353, in execute output = self.handle(*args, **options) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django_rotating_backup/management/commands/create_backup.py", line 13, in handle RotatingBackup().run() File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django_rotating_backup/backup.py", line 289, in run backup_file = self.make_media_backup(destination=destination, pattern=hour_pattern) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/site-packages/django_rotating_backup/backup.py", line 187, in make_media_backup backup_file.add(file) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/tarfile.py", line 1949, in add recursive, filter=filter) File "/Users/user/.virtualenvs/workinghours/lib/python3.7/tarfile.py", line 1947, in add for f in sorted(os.listdir(name)): PermissionError: [Errno 13] Permission denied: '/.DocumentRevisions-V100'

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.