View previous topic :: View next topic |
Author |
Message |
lowley n00b
Joined: 22 Jul 2016 Posts: 47
|
Posted: Tue Aug 09, 2016 4:44 pm Post subject: how many time to copy 100Go? |
|
|
hello,
I would like to backup a fresh gentoo installation, so when I partitionned my HDD I created 2 big partitions of 100Go each, of the same size : one for "/" and the other which purpose is to be used as a backup.
my idea was to realize the installation, and then to run "dd" to copy the system to the backup partition, but I ran the dd command 5 hours ago, and I don't know how many time it will take, as dd does not produce any console output...
have you got an idea of the time it will take?
the processor is a pentium 4, and to have an idea of its speed, the download of "kde-meta" (which seized 800Mo) and its compilation took 24 hours...
does it worth continuing?
thank you
olivier |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Aug 09, 2016 5:20 pm Post subject: |
|
|
lowley ...
send dd a USR1 signal:
Code: | # kill -USR1 $(pgrep dd) |
... this will cause dd to print a status, and so (estimated) time to completion.
You could also use 'watch' (from another terminal) to get dd to do this on some regular interval, eg, every 60 seconds:
Code: | # watch -n 60 kill -USR1 $(pgrep dd) |
HTH & best ... khay |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Tue Aug 09, 2016 5:35 pm Post subject: |
|
|
lowley,
dd copies the entire partition, without regard to what its used for. That means it copies all the empty space too.
To make a backup of your install, you only need to copy the content of the filesystem (the used space).
Part of the restore process is partitioning and installing the boot loader.
Google Gentoo Stage4
dd is very slow unless you use the bs=1M option. The default block size is 512B, which is a very bad choice if your HDD has 4kB physical blocks. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
lowley n00b
Joined: 22 Jul 2016 Posts: 47
|
Posted: Tue Aug 09, 2016 5:40 pm Post subject: |
|
|
hello,
your answer khayyam, is very interesting but how can I open an other terminal? I booted from the minimal system (~liveCD) and CTRL+ALT+F2 gives nothing.
hello Neddy, nice to talk to you again! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Tue Aug 09, 2016 9:00 pm Post subject: |
|
|
lowley,
CTRL+ALT+F2 should give a login prompt.
You can log in as root here ... but only if you know the root password. Unless you set it, you don't
Go back to the console running dd.
Put dd into the background with ctrl-z.
You should see a message about stopped jobs.
Run the passwd command and set the root password.
Resume dd with the fg command.
Go back to CTRL+ALT+F2 and log in as root, using the password you just set. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
lowley n00b
Joined: 22 Jul 2016 Posts: 47
|
Posted: Wed Aug 10, 2016 3:30 am Post subject: |
|
|
ok, I rebooted the computer...
now, I will try a stage 4 file as you said Needy, I saw this hint : https://forums.gentoo.org/viewtopic-t-146750-postdays-0-postorder-asc-start-0.html
but I have 2 questions:
- why a step "fstab" : doesn't the fstab file need to be updated if I restore the system as it was at the creation of the tarball?
- last step : grub;
I would like to have the confirmation that the statement here is : grub2-mkconfig -o /boot/grub/grub.cfg. is that all?
thanks. |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Wed Aug 10, 2016 8:11 am Post subject: |
|
|
I always make a backup from a live cd/dvd/sd/usb when the system to backup is down. If you copy bit by bit a partition, to work without further modifications, the restauration bit by bit must be done in the same condition than the backup.
For example, if, after the backup, you install a newer version of the bootloader, the restauration may not work without reinstalling the same version of it when the backup have been done. In the same way, if the partitions table have change after the backup, the restauration may fail to boot as it is.
I am happy to know that dd is now more verbose. You have dcfldd that I use who make copies bit by bit and give progress information too. tar is good. I use rsync too for backup. It have network capabilities. Unlike dd and dcfldd, who are good for bootable images creation and copy, with tar and rsync, you can copy only the data of a filesystem. The backup and the restauration are faster.
You have tools like Clonezilla and Partimage who are dedicated for backups and restaurations.
In all cases, you may have to reinstall the bootloader, recreate it's configuration file and check if fstab is set correctly. _________________ Paul |
|
Back to top |
|
|
lowley n00b
Joined: 22 Jul 2016 Posts: 47
|
Posted: Thu Aug 11, 2016 7:21 pm Post subject: |
|
|
the computer was blocked, that's why ALT+F2 did not worked.
I rebooted that. |
|
Back to top |
|
|
|