Backup and Restore Streams
Table of Contents
Elastio stream backup
Use the following command to back a stream up to a single file:
elastio stream backup --from-file <file-path>
Use the following command to back a stream up to several files:
elastio stream backup --from-file <file-path-1> <file-path-2> <file-path-3>
Use the following command to back up a stream:
elastio stream backup --stream-name <stream-name>
Use the following command to stream a file such as a text file and back this file up:
cat <file-name> | elastio stream backup --stream-name <stream-name>
Elastio stream restore
By design, the elastio stream restore
command restores the file to stdout.
There is an option to restore streams as files. To do so, use the following command:
elastio stream restore --rp <elastio-rp-id> --to-file <target-file-path>
If the file with the same name exists, when restoring a stream or file, the command prompt will prompt for confirmation to overwrite the original files as follows:
ubuntu@ip-172-31-43-100:~$ elastio stream restore --rp r-dfxkddb90c5ypr82wusxlr7n
Overwrite 'newfile' [y,n,q,a,d,?]?: ?
y - overwrite this file
n - skip this file
q - quit; do not restore any files
a - overwrite this file and all the remaining ones
d - skip this file and the remaining ones
? - print help
Overwrite 'newfile' [y,n,q,a,d,?]?:
If you need to silence the confirmation, for example, when using this command in a script, you can use the --overwrite
flag. For example:
elastio stream restore --rp <elastio-rp-id> --overwrite
Use the following command to restore a file to a different path on a Unix-based system:
elastio stream restore --host brain-core --rp @ --to-file :/home/user/<target-file-path>
Restoring a file to a directory owned by root needs root access. Therefore, it is crucial to add sudo -E
before the actual command as follows:
sudo -E elastio stream restore --host brain-core --rp @ --to-file /home/user/<target-file-path>