0

Have been using Ubuntu for about 2 weeks right now and I am in love with it. The only thing I was wondering if it is possible to view the percentage on a process in the terminal, sounds a bit vague but Ill explain it.

Every 2 days I am backing up my system by simply using the terminal. I know I can view my active services by simply typing "top". I notice that the service called gzip is currently active, which is (if I am not mistaken) the service needed for compressing the back up. I was wondering if I could select that service so that it shows me the approximate time needed and the percentage completed.

I don't know if it is possible, maybe that the service doesn't know the actual size of the back up being made or anything else, but I was simply wondering if there is something to monitor this. Could be coming handy for moving big files between HD's.

2
  • gzip is not a backup service, it is only a compression program that your real backup service likely uses. Jun 8, 2013 at 13:28
  • @grawity Thx! I changed my question. Jun 8, 2013 at 13:32

1 Answer 1

0

Quick answer: NO

gzip is simply a compression program, not a service in any way. It is equivalent to winzip (though it uses a different compression algorithm). gzip offers no option to track the completion of the process. As a general rule, on *nix you can see the manual for a command by running man COMMAND, for example man gzip.

Now, a better way to do what you are attempting is to use rsync for your backups which is designed for backing up data. rsync will not create a compressed archive but it can dynamically compress a file while it is being transferred and so dramatically speed up transfer rates:

rsync -azv --progress /files/to/backup /path/to/destination

OPTIONS:

    -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
    -v, --verbose               increase verbosity
    -z, --compress              compress file data during the transfer
        --progress              show progress during transfer

 -a option does the following:

Recursive mode
Preserves symbolic links
Preserves permissions
Preserves timestamp
Preserves owner and group

You may also be interested in tools that can automate all this like mintbackup

5
  • Ahh thx! Is there also a way to exclude files that you have in the folder which you are backing up? So for instance "--exclude=/media" Jun 8, 2013 at 14:26
  • Yes, rsync can do everything. Have a look through the link I posted or man rsync, the option you are looking for is --exclude=media.
    – terdon
    Jun 8, 2013 at 14:29
  • gzip uses the exact same "DEFLATE" algorithm as WinZip. Jun 13, 2013 at 14:04
  • @grawity really? I thought winzip used the same algorithm as zip which is different from gzip. Wikipedia seems to agree with me, stating that Zip is based on the LZR algorithm while gzip uses DEFLATE, a variation of LZ.
    – terdon
    Jun 13, 2013 at 14:23
  • 1
    @terdon: Yes, really, to the point that you can use gunzip to extract a file from a .zip archive (although only the first one, since that's how gunzip always works). But on the other hand, Zip archives support several compression methods, some old and out-of-use (e.g. Reduce and Implode), some newer (bzip2 or PPMd) – see APPNOTE.TXT § 4.4.5 which is the official format description. However, Deflate is the most common one. zlib's website also confirms this. Jul 11, 2013 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .