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

exit-code: 137 message: /usr/bin/tar #348

Open
beegegroup opened this issue Sep 7, 2023 · 5 comments
Open

exit-code: 137 message: /usr/bin/tar #348

beegegroup opened this issue Sep 7, 2023 · 5 comments
Assignees

Comments

@beegegroup
Copy link

beegegroup commented Sep 7, 2023

Hi Sebastian,

We are using your Tool to Backup our client-Websites successfully. We are happy with the Way it Backups our files.

We are now migrating one of our big Websites to a different Server. Which hasn't a Backup tool to upload to a remote File-Server.

The Website has at least 120GB of Data.

So during the Cron-Job we get following Message per Mail:
Exception 'RuntimeException' with message 'Command failed: exit-code: 137 message: /usr/bin/tar: Removing leading..' from member names /usr/bin/tar: Removing leading ../' from member names /usr/bin/tar: -: Wrote only 2048 of 10240 bytes /usr/bin/tar: Error is not recoverable: exiting now Killed ' in phar:///usr/www/users/janitp/01backup/phpbu.phar/lib/sf-cli/Command/Runner/Simple.php:61

Could you help us out with that?

Also, is there a possibility to Backup Data that we access through a symlink? Or is it possible to use a Full-Path as a Target to Backup?

Kind regards

Stefan

@sebastianfeldmann sebastianfeldmann self-assigned this Sep 10, 2023
@sebastianfeldmann
Copy link
Owner

Hi Stefan,

exit code: 137 means the process is killed because it ran out of memory.

Not sure if tar or PHP ran out of memory.

Are you packing a lot of small files together or only a couple of huge files?
If it's a lot of small files the CLI output buffer calling the tar from phpbu could be the issue.

Regarding the symlink / absolute path question: As long as tar can access the files with the given path from the CWD everything should work fine.

@beegegroup
Copy link
Author

beegegroup commented Sep 11, 2023

Hi Sebastian,

not quite sure, but the project does contain alot of files.

According to find [folder] -type f | wc -l there are 1293013 files.

The folder which has the phpbu.phar is a htaccess-file (recommended by the hoster) which sets the PHP-Memory limit and execution_time... don't know if the settings are working.

Not quite sure, what you mean by output-buffer^^

@sebastianfeldmann
Copy link
Owner

If you are executing phpbu on the CLI the htaccess settings are not working. But it looks like it's not phpbu running out of memory it looks like the tar command is because of its exit code of 137.

If you run phpbu --debug --simulate it should just output the commands it will run in a real backup.
You can try to execute the tar command from the debug output manually just to make sure it works.

@beegegroup
Copy link
Author

beegegroup commented Sep 14, 2023

I used following Command (updated) :

"/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar &

unfortunately I wasn't able to run the command per ssh...

could you assist?

I also tried:

screen
/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar >> backup-log.txt &

alt +a +d

@beegegroup
Copy link
Author

Hey Sebastian,

i checked ssh today, and i got following info:
janitp:~$ "/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar >> backup-log.txt & [4] 25164 janitp:~$ ps aux | grep tar janitp 35501 0.0 0.0 7800 652 pts/1 S+ 09:13 0:00 grep tar [1] Killed "/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar [2] Killed "/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar [3] Killed "/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar >> backup-log.txt [4]+ Killed "/usr/bin/tar" --exclude='01backup' --listed-incremental='/usr/www/users/janitp/01backup/metadata.snar' -c -C '/usr/www/users/janitp/01backup' '..' | "pv" -qL '5m' > /usr/www/users/janitp/01backup/data/data-20230912-1409.tar >> backup-log.txt

I saw the killed response before. So maybe with the Server-Settings certain processes get automatically killed.

kind regards

Stefan

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