You are not logged in.

#1 2011-06-28 15:25:29

spyrosk
Member
Registered: 2011-06-28
Posts: 5

Pacman + Yaourt backups

Hi, I am trying to set up a quick way to replicate my VPS setup so that I can use it as a dev environment, perhaps in a VM, and have backups ready to go in case something is wrong with my hosting provider. Ideally I would like to be able to restore all my installed packages in a fresh/clean system and then copy all my application files from the backups. When it comes to replicating the currently installed packages, I have searched around but I am a bit confused by all the available options. From these options what is the best one?

comm -23 <(yaourt -Qeq) <(yaourt -Qgq base base-devel | sort ) > PackageList.txt
yaourt -Q > PackageList.txt
yaourt -B

Also I've looked into packup in AUR, that supposedly fits my needs, but it is reported as out of date.

Offline

#2 2011-06-29 04:40:28

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Pacman + Yaourt backups

What are you planning to replicate? Kick yaourt out of the equation, it may be useful, but using pacman alone will be more dependable in the long-run.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2011-06-29 05:57:36

spyrosk
Member
Registered: 2011-06-28
Posts: 5

Re: Pacman + Yaourt backups

Hi ngoonee and thanks for the reply!
What I mean when I say replicate, is to have a way to create a system almost identical to my VPS setup, with the same installed programs, files, database data etc. This system could be used as a development server on a local VM for example or as a quick way to bring up my server in case something goes wrong, even with my VPS provider (moving to another provider will be much easier).
I understand why yaourt could cause trouble but how will I manage my AUR packages then?

Last edited by spyrosk (2011-06-29 06:01:55)

Offline

#4 2011-06-29 06:23:11

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Pacman + Yaourt backups

For what you want to do, you can either setup your own repo (then you can push your AUR packages to that repo) or write a script to handle installing the packaegs from your compiled binaries. Using yaourt just means every machine/VM would have to recompile every AUR package you use, which is a horrible waste of time and computing power, especially in a VM.

Just get a list of explicitly installed packages and another list of non-repo packages (both can be done with pacman, you'd have to grep the first list with the second list to remove duplicates). Use that first list to install all repo packages, the second list (if its not very long) you can use to install the packages yourself, or write a simple script to install using pacman -U and the package binaries.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2011-06-29 07:23:15

spyrosk
Member
Registered: 2011-06-28
Posts: 5

Re: Pacman + Yaourt backups

When it comes to wasting resources you have a point, as I would like the whole process to be as fast as possible. But won't there be problems when it comes to using the precompiled binaries in another system, due to differences in hardware?
Also, right now the VPS is 32bit, wouldn't it be possible to "move" the current setup to 64bit architecture using just the list of installed packages without the binaries? (Right now there is no need for this, but there may be in the future)

Offline

#6 2011-06-29 09:13:30

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Pacman + Yaourt backups

Well, cross-architecture there will be a problem, but for the same architecture there should not be any differences (unless your software compiles differently based on hardware available, which only the kernel and its modules do AFAICR).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2011-06-29 20:01:17

spyrosk
Member
Registered: 2011-06-28
Posts: 5

Re: Pacman + Yaourt backups

I see, so in case I want to "move" my setup to a different architecture which of the commands I wrote should I use?
I will try implement your recommendation as well.

Thanks for all the help!

Offline

#8 2011-07-01 08:19:19

spyrosk
Member
Registered: 2011-06-28
Posts: 5

Re: Pacman + Yaourt backups

Are there any reasons to specifically choose one of the following?

comm -23 <(yaourt -Qeq) <(yaourt -Qgq base base-devel | sort ) > PackageList.txt
yaourt -Q > PackageList.txt
yaourt -B

Offline

Board footer

Powered by FluxBB