12/31/2023 0 Comments Tar compress and ssh to remote folder![]() ![]() With that dump you are sure, that you did not miss any important metadata (like ACLs) which tar won't capture. Do that with other partitions on the failing drive, too. Where you had to adopt /dev/sda1 to the right device. However, you should (also) consider to make a dd dump of the failing drive's partitions: cd good_partition netcat -l -p 1234 > dd if=/dev/sda1 | netcat good_host.ip 1234 The tar command on Linux is often used to create. To compress the files locally, you would have to download the uncompressed files, compress them (with your local Python code), and upload the compressed archive, only to download it then again. To extract an archive to the current folder, run the command tar -xzvf (archive file)'. 1 Answer Sorted by: 1 You have to compress the directory using tools on the server. gz is a compression tool based on a Lempel-Ziv algorithm, it. (especially the file representing your RAM in ( /proc/kcore) will add an unnecessary amount of data). Run 'tar -czvf (archive name).tar.gz (pathtofile) in the Terminal to compress a file or folder. It is a tool to make tar files is to put all files you want into a single file. For example, to restore from a dump directory to a local mongod instance running on port. I included some -exclude parameters, as /proc and /sys are virtual filesystems and hence useless on the new host. Run mongorestore from the system command line, not the mongo shell. The bad host sends the data to this port, also using tar and netcat. of the network, and whether you're already using compression in ssh. Which opens a listening port 1234 on the good machine netcat -l -p 1234 and pipes the incoming data to tar to extract (preserving mtime and permissions). Hack 37 Copy arbitrary bits of the filesystem between servers. ![]() cd good_partition netcat -l -p 1234 | tar xvpmf tar -cv -f-exclude=/proc -exclude=/sys / | netcat good_host.ip 1234 This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. This is usually much faster as it doesn't encrypt the data. This question does not meet Stack Overflow guidelines. If both computers are on the same (safe) LAN, I recommend a different approach using netcat. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |