I've been using Grsync to back up my /home directory for years, but have never had the occasion to restore a backup. Reading about the restore process, mostly regarding full system backups, I have read that one should NOT back up to the mounted system (eg the one I am logged in to). And the reasons make sense. However, I am wondering if I can restore just my /home directory while I am logged in. I exclude the .xsession logs and the .cache from the backup, just in case that would make a difference in your answers.
And just in case the answer is that I should not do the restore whole logged in, I might have an alternative solution. I have two user accounts on my desktop (and two other drives with Bullseye installed). Wondering if I could log in as the other user to restore to /home my main user. Lots of wondering here, but not yet wandering. LOL! Enlightenment would be wonderful!
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[solved] Restore /home backup with Grsync
- cds60601
- df -h | participant
- Posts: 739
- Joined: 2017-11-25 05:58
- Location: Florida
- Has thanked: 136 times
- Been thanked: 65 times
Re: Restore /home backup with Grsync
To play it safe, login as another user, rename the directory in questions IE: /home/myname to /home/myname.orig
Then run your restore. Logout then in as the user you wish to and have a look around.
Then run your restore. Logout then in as the user you wish to and have a look around.
Supercalifragilisticexpialidocious
- ticojohn
- Posts: 1284
- Joined: 2009-08-29 18:10
- Location: Costa Rica
- Has thanked: 21 times
- Been thanked: 44 times
Re: Restore /home backup with Grsync
Not sure I follow you. Can I just rename my user home directory or just add another user directory in /home without creating a user? Sounds confusing to me, but I am still learning.cds60601 wrote:To play it safe, login as another user, rename the directory in questions IE: /home/myname to /home/myname.orig
Then run your restore. Logout then in as the user you wish to and have a look around.
Why not just log in to /home/user and see if I can restore /home/user to the already existing /home/anybody? And if I can then I should be able to log in to /home/anybody and restore to /home/user.
I am not irrational, I'm just quantum probabilistic.
- cds60601
- df -h | participant
- Posts: 739
- Joined: 2017-11-25 05:58
- Location: Florida
- Has thanked: 136 times
- Been thanked: 65 times
Re: Restore /home backup with Grsync
You can, of course! I have done some similar things. What I have done was login as root, renamed the directory in questions (to preserve whatever might need preserving) than do your restore. At that point, you should be able to just login as that user, effectively into the restored home dir. Honestly, I never ran a resore over the dir I was in. I played it safe as I know that if you overwrite something that was needed, well, you know. When I am certain I no longer need the renamed dir, I then remove it. This works for me and may not be a good choice for others so I think you asking the questions before doing anything is good.ticojohn wrote:Not sure I follow you. Can I just rename my user home directory or just add another user directory in /home without creating a user? Sounds confusing to me, but I am still learning.cds60601 wrote:To play it safe, login as another user, rename the directory in questions IE: /home/myname to /home/myname.orig
Then run your restore. Logout then in as the user you wish to and have a look around.
Why not just log in to /home/user and see if I can restore /home/user to the already existing /home/anybody? And if I can then I should be able to log in to /home/anybody and restore to /home/user.
And to clarify - I rename the home dir so that the restore actually places the home dir where it should
Supercalifragilisticexpialidocious
- ticojohn
- Posts: 1284
- Joined: 2009-08-29 18:10
- Location: Costa Rica
- Has thanked: 21 times
- Been thanked: 44 times
Re: Restore /home backup with Grsync
@cds60601, thanks for your suggestions. I'm going to think on it awhile. When I figure out exactly what I'm going to do I'll get back and post what I did and the results. Hopefully successful results.
I am not irrational, I'm just quantum probabilistic.
- sunrat
- Administrator
- Posts: 6495
- Joined: 2006-08-29 09:12
- Location: Melbourne, Australia
- Has thanked: 118 times
- Been thanked: 476 times
Re: Restore /home backup with Grsync
To be absolutely safe and simple, I always do system backups or restores from a separate system either multiboot or a live USB. To backup $HOME to a separate drive I do it from the normal active system, but would restore it from a separately booted system. As you mentioned things like caches for DE and browsers get written often so even when backing up, from an active system some files may be changed between the time you start backup and when it finishes. Probably those changes won't matter at all but I'm fussy about those kind of things.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
Those who have lost data
...and those who have not lost data YET ” Remember to BACKUP!
- ticojohn
- Posts: 1284
- Joined: 2009-08-29 18:10
- Location: Costa Rica
- Has thanked: 21 times
- Been thanked: 44 times
Re: Restore /home backup with Grsync
Thanks @sunrat. Good advice.sunrat wrote:To be absolutely safe and simple, I always do system backups or restores from a separate system either multiboot or a live USB. To backup $HOME to a separate drive I do it from the normal active system, but would restore it from a separately booted system. As you mentioned things like caches for DE and browsers get written often so even when backing up, from an active system some files may be changed between the time you start backup and when it finishes. Probably those changes won't matter at all but I'm fussy about those kind of things.
I am not irrational, I'm just quantum probabilistic.
- ticojohn
- Posts: 1284
- Joined: 2009-08-29 18:10
- Location: Costa Rica
- Has thanked: 21 times
- Been thanked: 44 times
Re: Restore /home backup with Grsync
I think my biggest issue with rsync has been thinking that it is something mystical. It's actually just a really sophisticated copy tool. With that, and with the advice and suggestions I have received, I am going to experiment and learn all I can about rsync, with my non-production installation. Thanks to those that commented. Will consider this closed.
I am not irrational, I'm just quantum probabilistic.