Closed kmille closed 4 months ago
That rather looks like an issue with your temp directory.
Remote: FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/kmille']
But if the fs is completely out of space, that is a bad situation to be in (that's why the docs warn about it).
Can you make the fs bigger? If not, can you copy the files to a bigger fs?
Can you make the fs bigger? If not, can you copy the files to a bigger fs? Nope
OK, then at least check what's up with the temp directory.
Also do a ls -l
in the repo/ directory and also in the 2 highest-number subdirs inside repo/data/ and post it below or on a pastebin.
This will get a bit complicated and risky. If it is super important and you don't want to take the risk of making it worse, make a copy of your current repo state.
Also, you might need to execute some borg
commands directly as I have no clue about borgctl
.
borgctl is just a wrapper, I can just use borg. But you see all the borgs command that are executed. It's one of the remote backup storage. So no worry. But it would be nice to have it up and running again.
borg info fails
kmille@linbox:.ssh sudo borgctl -c 123 info
2024-05-02 14:42:13,023 INFO Using config file /etc/borgctl/123.yml
Please enter the borg passphrase for kmille@1.2.3.4:borg-laptop:
2024-05-02 14:42:28,634 INFO Executing: BORG_REPO="kmille@1.2.3.4:borg-laptop" BORG_LOGGING_CONF="/etc/borgctl/logging.conf" BORG_RELOCATED_REPO_ACCESS_IS_OK="yes" BORG_RSH="ssh -i /root/.ssh/borg_123_laptop" /usr/bin/borg --verbose info
2024-05-02 14:42:30,380 ERROR Remote: self test test_identical_creation (borg.testsuite.hashindex.HashIndexDataTestCase.test_identical_creation) FAILED:
Remote: Traceback (most recent call last):
Remote: File "/usr/lib/python3/dist-packages/borg/testsuite/hashindex.py", line 339, in test_identical_creation
Remote: serialized = self._serialize_hashindex(idx1)
Remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remote: File "/usr/lib/python3/dist-packages/borg/testsuite/hashindex.py", line 314, in _serialize_hashindex
Remote: with tempfile.TemporaryDirectory() as tempdir:
Remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remote: File "/usr/lib/python3.11/tempfile.py", line 993, in __init__
Remote: self.name = mkdtemp(suffix, prefix, dir)
Remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remote: File "/usr/lib/python3.11/tempfile.py", line 496, in mkdtemp
Remote: prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
Remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remote: File "/usr/lib/python3.11/tempfile.py", line 265, in _sanitize_params
Remote: dir = gettempdir()
Remote: ^^^^^^^^^^^^
Remote: File "/usr/lib/python3.11/tempfile.py", line 438, in gettempdir
Remote: return _os.fsdecode(_gettempdir())
Remote: ^^^^^^^^^^^^^
Remote: File "/usr/lib/python3.11/tempfile.py", line 431, in _gettempdir
Remote: tempdir = _get_default_tempdir()
Remote: ^^^^^^^^^^^^^^^^^^^^^^
Remote: File "/usr/lib/python3.11/tempfile.py", line 362, in _get_default_tempdir
Remote: raise FileNotFoundError(_errno.ENOENT,
Remote: FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/kmille']
Remote:
2024-05-02 14:42:30,430 ERROR Connection closed by remote host. Is borg working on the server?
2024-05-02 14:42:30,506 ERROR Borg failed with exit code 2
I'm out of space:
kmille@borg01:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 478M 0 478M 0% /dev
tmpfs 98M 468K 98M 1% /run
/dev/sda1 296G 284G 0 100% /
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 98M 0 98M 0% /run/user/1001
Regarding TMP:
kmille@borg01:~$ ls /tmp/
systemd-private-32fc863ff9e84481940d8eeabf21638f-ntpsec.service-P65kRe systemd-private-32fc863ff9e84481940d8eeabf21638f-systemd-logind.service-z9cS2x
kmille@borg01:~$ ls /var/tmp/
cloud-init systemd-private-32fc863ff9e84481940d8eeabf21638f-ntpsec.service-owVh2q systemd-private-32fc863ff9e84481940d8eeabf21638f-systemd-logind.service-z57NEn
kmille@borg01:~$ ls /usr/tmp
ls: cannot access '/usr/tmp': No such file or directory
kmille@borg01:~$ ls /home/kmille/
borg-more-data borg-laptop borg-more-more
kmille@borg01:~$ echo 123 > /tmp/test.txt
-bash: echo: write error: No space left on device
Regarding borg
kmille@borg01:~/borg-laptop$ ls -l
total 90696
-rw------- 1 kmille kmille 700 Jan 9 12:24 config
drwx------ 3 kmille kmille 4096 Jan 9 12:24 data
-rw------- 1 kmille kmille 5267447 Apr 22 09:39 hints.602
-rw------- 1 kmille kmille 87578378 Apr 22 09:39 index.602
-rw------- 1 kmille kmille 190 Apr 22 09:39 integrity.602
-rw------- 1 kmille kmille 16 Apr 30 10:41 nonce
-rw------- 1 kmille kmille 73 Jan 9 12:24 README
-rw------- 1 kmille kmille 3229 Apr 22 09:39 transactions
kmille@borg01:~/borg-laptop$ ls -l data/
total 12
drwx------ 2 kmille kmille 12288 Apr 30 10:42 0
kmille@borg01:~/borg-laptop$ ls data/0/ -lv
...
-rw------- 1 kmille kmille 17 Apr 22 09:39 599
-rw------- 1 kmille kmille 49 Apr 22 09:39 600
-rw------- 1 kmille kmille 1885 Apr 22 09:39 601
-rw------- 1 kmille kmille 17 Apr 22 09:39 602
-rw------- 1 kmille kmille 524389521 Apr 30 10:25 603
-rw------- 1 kmille kmille 524980570 Apr 30 10:28 604
-rw------- 1 kmille kmille 524485294 Apr 30 10:31 605
-rw------- 1 kmille kmille 524753901 Apr 30 10:34 606
-rw------- 1 kmille kmille 524298357 Apr 30 10:35 607
-rw------- 1 kmille kmille 525603612 Apr 30 10:37 608
-rw------- 1 kmille kmille 524850642 Apr 30 10:39 609
-rw------- 1 kmille kmille 526923171 Apr 30 10:41 610
-rw------- 1 kmille kmille 527638641 Apr 30 10:42 611
-rw------- 1 kmille kmille 484970496 Apr 30 10:44 612
kmille@borg01:~/borg-laptop$
Anything else you need? Thanks for your support!
/dev/sda1 296G 284G 0 100% /
No, you are not really out of space, you have ~12GB left.
For ext4 (ext3, ext2), there is a "reserved free space only for root" percentage you can adjust with tune2fs
.
So:
Thanks! After running tune2fs -m 1 /dev/sda1
I could use borg again (prune/compact). Thanks!
Hey,
I'm using
borg 1.2.8
. The remote disk is full and I don't know how to proceed. How can I prune/compact old backups in this situation (even manual with a shell?). Thanks.