Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when backing up to S3 #2

Open
ameyb opened this issue Jun 26, 2013 · 1 comment
Open

Error when backing up to S3 #2

ameyb opened this issue Jun 26, 2013 · 1 comment

Comments

@ameyb
Copy link

ameyb commented Jun 26, 2013

OSError: [Errno 18] Invalid cross-device link

Installed cassback according to the instructions. When I am running the backup command -

cassback --endpoint s3 --aws-key xx --aws-secret xx --bucket-name cassandra-backup backup --include-system --cassandra_data_dir=/mnt/cassandra/data/

I get the following error. Let me know if this can be fixed.

Error:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/cassback-0.1.1-py2.7.egg/cassback/scripts.py", line 126, in cassback_main
rv, out = sub_command()
File "/usr/local/lib/python2.7/dist-packages/cassback-0.1.1-py2.7.egg/cassback/subcommands/backup_subcommand.py", line 119, in call
watcher.start()
File "/usr/local/lib/python2.7/dist-packages/cassback-0.1.1-py2.7.egg/cassback/subcommands/backup_subcommand.py", line 254, in start
enqueue=not(self.ignore_existing))
File "/usr/local/lib/python2.7/dist-packages/cassback-0.1.1-py2.7.egg/cassback/subcommands/backup_subcommand.py", line 286, in _maybe_queue_file
with file_util.FileReferenceContext(file_path) as file_ref:
File "/usr/local/lib/python2.7/dist-packages/cassback-0.1.1-py2.7.egg/cassback/file_util.py", line 142, in enter
os.link(self._source_path, stable_path)
OSError: [Errno 18] Invalid cross-device link

Thanks,
Amey

@echoajohnson
Copy link

The problem is most likely that the systems tmp directory is on a different partition than the cassandra data directory.

The workaround I used was to set the tmp directory to be on the same partition within the context of the cassback run.

For example:

export TMPDIR=/data/cassback/tmp

The python function will honor that setting.

I do not recommend setting that as a global so create a small wrapper script that will set it as needed on each run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants