cassandra_snapshotter icon indicating copy to clipboard operation
cassandra_snapshotter copied to clipboard

snapshots fail with permission denied.

Open Jaikant opened this issue 9 years ago • 1 comments

The first time I run the tool, it works well, the subsequent times it gives an error:

[cassandrahost] out: Traceback (most recent call last): [cassandrahost] out: File "/usr/local/bin/cassandra-snapshotter-agent", line 9, in [cassandrahost] out: load_entry_point('cassandra-snapshotter==0.4.0', 'console_scripts', 'cassandra-snapshotter-agent')() [cassandrahost] out: File "/usr/local/lib/python2.7/dist-packages/cassandra_snapshotter/agent.py", line 266, in main [cassandrahost] out: args.incremental_backups [cassandrahost] out: File "/usr/local/lib/python2.7/dist-packages/cassandra_snapshotter/agent.py", line 151, in put_from_manifest [cassandrahost] out: os.remove(f) [cassandrahost] out: OSError: [Errno 13] Permission denied: '/mnt/cassandra/data/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/backups/la-4-big-Filter.db'

Are these file in the "backups" directory above, something which is leftover from before? There are a bunch of such files and it keep failing on them. The permissions on these files are:

ls -l /mnt/cassandra/data/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/backups/la-4-big-Filter.db -rw-r--r-- 1 cassandra cassandra 16 Feb 7 15:00 /mnt/cassandra/data/system/schema_triggers-0359bc7171233ee19a4ab9dfb11fc125/backups/la-4-big-Filter.db

I am running the snapshotted from my mac which SSH's into the node, using the ubuntu user. Any suggestions why it is failing for me, is it the permissions on the file? If so why only I am hitting this issue?

Jaikant avatar Feb 07 '16 15:02 Jaikant

the tool assumes that the user performing the backups (that connects via SSH) has access to the backup files. As an alternative you can tell the agent to use sudo (in that case the user needs to have sudo available and password prompt off) via the --use-sudo option

tbarbugli avatar Apr 13 '17 16:04 tbarbugli