Ask Your Question
1

Backup Fedora 27 from machine to a different machine

asked 2017-12-20 05:05:59 -0600

Cyber Linux gravatar image

updated 2017-12-20 05:07:51 -0600

What are the files I could Backup them from my Fedora 27 to a different machine of Fedora 27. Then I could restore them by using Gnome back tool (Déjà Dup Backup Tool).

/etc /home /root

What else?

Also, how could I backup my package as txt then restore that by terminal?

Thank you in advance

edit retag flag offensive close merge delete

Comments

It depend on what you are trying to achieve. You might consider rsync.

fcomida gravatar imagefcomida ( 2017-12-20 08:14:37 -0600 )edit

Would you mind telling us why you ask the same question again? https://ask.fedoraproject.org/en/ques...

Also, have you searched this site for backup advice? There is a lot of legit information out there.

florian gravatar imageflorian ( 2017-12-20 11:48:26 -0600 )edit

fcomida = Déjà Dup Backup Tool has the same idea. thank you

Cyber Linux gravatar imageCyber Linux ( 2017-12-20 16:51:42 -0600 )edit

florian = sorry, but no one had the right answer, I just can restore my /home dic, I got issues when try with /etc. Now, how could I backup my package as txt with more 400+ then restore that by terminal?

Cyber Linux gravatar imageCyber Linux ( 2017-12-20 16:53:16 -0600 )edit

Cyber Linux didn't you ask for a command line tool? I don't actually understand what are you asking for and what issues are you encountering.

fcomida gravatar imagefcomida ( 2017-12-20 17:10:14 -0600 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2017-12-21 09:00:06 -0600

Cyber Linux gravatar image

This one works for me:

for i in `cat textfile.txt` ; do dnf -y install $i; done

textfile.txt= your txt file of the list the packages!

Great command~

edit flag offensive delete link more

Comments

Use dnf repoquery --qf "%{name}" --userinstalled > textfile.txt to export the list of packages. This way you will only export the name of the packages, whithout version, release or arch number. Version and release may change between backup and restore date and then dnf install ... can't find the package in the repos.

florian gravatar imageflorian ( 2017-12-21 09:31:29 -0600 )edit

many thanks ")

Cyber Linux gravatar imageCyber Linux ( 2017-12-21 23:10:31 -0600 )edit
1

answered 2017-12-21 09:33:28 -0600

florian gravatar image

updated 2017-12-21 09:46:51 -0600

Answering your question regarding backup of installed packages from terminal

Backup:

dnf repoquery --qf "%{name}" --userinstalled > userinstalled.txt

Restore:

sudo dnf install $(cat userinstalled.txt)

if you want to automate the backup process, it could be helpful to output the list like this:

sudo dnf repoquery --qf "%{name}" --userinstalled > ~/"userinstalled-"$HOSTNAME-`date +"%Y-%m-%d".txt`
edit flag offensive delete link more

Comments

many thanks ")

Cyber Linux gravatar imageCyber Linux ( 2017-12-21 23:10:41 -0600 )edit

You're welcome

florian gravatar imageflorian ( 2017-12-22 18:54:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-12-20 05:05:59 -0600

Seen: 819 times

Last updated: Dec 21 '17