A
A
Anton B2016-12-16 12:24:48
linux
Anton B, 2016-12-16 12:24:48

How to make ladies parts from send to amazon?

Hello!
There is a directory with images, 20Gb in size.
Now the dump of the directory goes like this

/bin/tar -cf $DUMPFILES.tar $HOME/www // создать архив
/usr/bin/split -d -b 3G $DUMPFILES.tar $DUMPFILES.tar. // разбить архив на части по 3Гб
/bin/rm $DUMPFILES.tar // удалить исходный архив
/usr/bin/s3cmd -c /root/.s3cfg put $DUMPFILES.tar.* s3://backup/ // отправить архив на Амазон

The problem is that the archive on the disk requires another 20Gb, which is not available (SSD disk).
Is there a simple solution that allows you to create an archive in parts and send these parts to Amazon right away? That is, I typed files from a 3GB catalog, archived them, and sent them to Amazon.
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2016-12-16
@bigton

Try it as a stream, without saving to a file! (pass immediately after put means immediately take from the stream)
Can be compressed immediately
Well, or with such a mooooo command to beat, send and delete. (we make a pipe, hit it on a file, send the file and immediately delete it, send the next file, and delete it again)

/bin/tar -cz $HOME/www | /usr/bin/split -d -b 3G - $DUMPFILES.tar. --filter 's3cmd -c /root/.s3cfg put - s3://backup/$FILE'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question