<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://alexandria.anarchaserver.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Maxigas</id>
	<title>Anarchaserver - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://alexandria.anarchaserver.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Maxigas"/>
	<link rel="alternate" type="text/html" href="https://alexandria.anarchaserver.org/index.php/Special:Contributions/Maxigas"/>
	<updated>2026-05-17T19:48:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://alexandria.anarchaserver.org/index.php?title=Backup&amp;diff=692</id>
		<title>Backup</title>
		<link rel="alternate" type="text/html" href="https://alexandria.anarchaserver.org/index.php?title=Backup&amp;diff=692"/>
		<updated>2019-12-16T20:56:55Z</updated>

		<summary type="html">&lt;p&gt;Maxigas: /* Current setup */ Make the working less ambiguous&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Current setup = &lt;br /&gt;
&lt;br /&gt;
We currently make a nightly backup of all containers from our virtual machine (called &amp;lt;code&amp;gt;anoia&amp;lt;/code&amp;gt;) to the virtual machine of calafou.org (called &amp;lt;code&amp;gt;ebro&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
We use the backup tool called &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt; through a package from the Debian repository.&lt;br /&gt;
&lt;br /&gt;
We wrote a script that performs that backup, which is located at &amp;lt;code&amp;gt;/usr/local/bin/backup.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The backup script runs every night around 4am, because we run it via &amp;lt;code&amp;gt;cron&amp;lt;/code&amp;gt; (configured with &amp;lt;code&amp;gt;sudo crontab -e&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
In the cron job we redirect the script output to &amp;lt;code&amp;gt;/var/log/backup.log&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script stops ALL the containers (to have enough RAM for running &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt; and to make sure that the databases and other volatile files inside the containers are not changing during the backup), backs up the containers, then starts the containers again.  Obviously, while the containers are stopped and the backup is running, the anarchaserver services are not available.  We have many ideas about how to do a backup without service interruption, but we have not implemented them yet.&lt;br /&gt;
&lt;br /&gt;
There are many possible improvements to this system: &lt;br /&gt;
&lt;br /&gt;
* Change remote: switch from calafou virtual machine to S14&lt;br /&gt;
* Optimise the script: rewrite the script to be a more beautiful program&lt;br /&gt;
* Test backup recovery: try to restore the backup to make sure it is possible&lt;br /&gt;
* Change the backup tool: use &amp;lt;code&amp;gt;borgbackup&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt;&lt;br /&gt;
* Use a backup manager such as &amp;lt;code&amp;gt;backupninja&amp;lt;/code&amp;gt;&lt;br /&gt;
* Etc.&lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* How to back up a Debian system using backupninja? http://xmodulo.com/backup-debian-system-backupninja.html&lt;br /&gt;
* Using Duplicity to backup LXC containers https://www.savjee.be/2017/05/Using-Duplicity-to-Backup-LXC-Containers/&lt;br /&gt;
* Implement a backup system of livingdata and repository containers (gitlab issue on systerserver) https://git.systerserver.net/collective-anarchaserver/organizing/issues/1&lt;br /&gt;
* Roadmap https://git.systerserver.net/collective-anarchaserver/organizing/issues/1&lt;br /&gt;
&lt;br /&gt;
= Older notes =&lt;br /&gt;
&lt;br /&gt;
STEP 1&lt;br /&gt;
check data usage&lt;br /&gt;
df -h&lt;br /&gt;
&lt;br /&gt;
STEP 2&lt;br /&gt;
check access to another virtual machine&lt;br /&gt;
&lt;br /&gt;
STEP 3&lt;br /&gt;
start screen session in root&lt;br /&gt;
&lt;br /&gt;
STEP 4&lt;br /&gt;
copy data to virtual machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rsync -ravz --progress --exclude &amp;quot;/proc&amp;quot; --exclude &amp;quot;/sys&amp;quot; --exclude &amp;quot;/dev&amp;quot; -e &amp;quot;ssh -p 8022&amp;quot; / root@188.210.92.35:/var/backups/vm/anarcha &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
r (recursive)&lt;br /&gt;
a (archive - for special files)&lt;br /&gt;
v (verbose)&lt;br /&gt;
z (compressed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
STEP 5&lt;br /&gt;
diagnostics&lt;br /&gt;
&lt;br /&gt;
watch&lt;br /&gt;
watch -n 180 &amp;quot;du -sh /var/backups/vm/anarcha&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc/kcore is a special directory which is created each time the computer boots&lt;br /&gt;
so we have to exclude it from the rsync command&lt;br /&gt;
&lt;br /&gt;
bwm-ng&lt;br /&gt;
we want to know whether the data is arriving and at which speed, data amount&lt;br /&gt;
http://linux.die.net/man/1/bwm-ng&lt;br /&gt;
&lt;br /&gt;
apt-get install bwm-ng&lt;/div&gt;</summary>
		<author><name>Maxigas</name></author>
	</entry>
	<entry>
		<id>https://alexandria.anarchaserver.org/index.php?title=Backup&amp;diff=685</id>
		<title>Backup</title>
		<link rel="alternate" type="text/html" href="https://alexandria.anarchaserver.org/index.php?title=Backup&amp;diff=685"/>
		<updated>2019-08-13T23:12:45Z</updated>

		<summary type="html">&lt;p&gt;Maxigas: Add useful links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Current setup = &lt;br /&gt;
&lt;br /&gt;
We currently make a nightly backup of all containers from our virtual machine (called &amp;lt;code&amp;gt;ebro&amp;lt;/code&amp;gt;) to the virtual machine of calafou.org (called &amp;lt;code&amp;gt;anoia&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
We use the backup tool called &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt; through a package from the Debian repository.&lt;br /&gt;
&lt;br /&gt;
We wrote a script that performs that backup, which is located at &amp;lt;code&amp;gt;/usr/local/bin/backup.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The backup script runs every night around 4am, because we have put it in &amp;lt;code&amp;gt;cron&amp;lt;/code&amp;gt; (using the &amp;lt;code&amp;gt;sudo crontab -e&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
In the cron job we redirect the script output to &amp;lt;code&amp;gt;/var/log/backup.log&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script stops ALL the containers (to have enough RAM for running &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt; and to make sure that the databases and other volatile files inside the containers are not changing during the backup), backs up the containers, then starts the containers again.  Obviously, while the containers are stopped and the backup is running, the anarchaserver services are not available.  We have many ideas about how to do a backup without service interruption, but we have not implemented them yet.&lt;br /&gt;
&lt;br /&gt;
There are many possible improvements to this system: &lt;br /&gt;
&lt;br /&gt;
* Change remote: switch from calafou virtual machine to S14&lt;br /&gt;
* Optimise the script: rewrite the script to be a more beautiful program&lt;br /&gt;
* Test backup recovery: try to restore the backup to make sure it is possible&lt;br /&gt;
* Change the backup tool: use &amp;lt;code&amp;gt;borgbackup&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt;&lt;br /&gt;
* Use a backup manager such as &amp;lt;code&amp;gt;backupninja&amp;lt;/code&amp;gt;&lt;br /&gt;
* Etc. &lt;br /&gt;
&lt;br /&gt;
= Useful links =&lt;br /&gt;
&lt;br /&gt;
* How to back up a Debian system using backupninja? http://xmodulo.com/backup-debian-system-backupninja.html&lt;br /&gt;
* Using Duplicity to backup LXC containers https://www.savjee.be/2017/05/Using-Duplicity-to-Backup-LXC-Containers/&lt;br /&gt;
* Implement a backup system of livingdata and repository containers (gitlab issue on systerserver) https://git.systerserver.net/collective-anarchaserver/organizing/issues/1&lt;br /&gt;
* Roadmap https://git.systerserver.net/collective-anarchaserver/organizing/issues/1&lt;br /&gt;
&lt;br /&gt;
= Older notes =&lt;br /&gt;
&lt;br /&gt;
STEP 1&lt;br /&gt;
check data usage&lt;br /&gt;
df -h&lt;br /&gt;
&lt;br /&gt;
STEP 2&lt;br /&gt;
check access to another virtual machine&lt;br /&gt;
&lt;br /&gt;
STEP 3&lt;br /&gt;
start screen session in root&lt;br /&gt;
&lt;br /&gt;
STEP 4&lt;br /&gt;
copy data to virtual machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rsync -ravz --progress --exclude &amp;quot;/proc&amp;quot; --exclude &amp;quot;/sys&amp;quot; --exclude &amp;quot;/dev&amp;quot; -e &amp;quot;ssh -p 8022&amp;quot; / root@188.210.92.35:/var/backups/vm/anarcha &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
r (recursive)&lt;br /&gt;
a (archive - for special files)&lt;br /&gt;
v (verbose)&lt;br /&gt;
z (compressed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
STEP 5&lt;br /&gt;
diagnostics&lt;br /&gt;
&lt;br /&gt;
watch&lt;br /&gt;
watch -n 180 &amp;quot;du -sh /var/backups/vm/anarcha&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc/kcore is a special directory which is created each time the computer boots&lt;br /&gt;
so we have to exclude it from the rsync command&lt;br /&gt;
&lt;br /&gt;
bwm-ng&lt;br /&gt;
we want to know whether the data is arriving and at which speed, data amount&lt;br /&gt;
http://linux.die.net/man/1/bwm-ng&lt;br /&gt;
&lt;br /&gt;
apt-get install bwm-ng&lt;/div&gt;</summary>
		<author><name>Maxigas</name></author>
	</entry>
	<entry>
		<id>https://alexandria.anarchaserver.org/index.php?title=Backup&amp;diff=684</id>
		<title>Backup</title>
		<link rel="alternate" type="text/html" href="https://alexandria.anarchaserver.org/index.php?title=Backup&amp;diff=684"/>
		<updated>2019-08-13T15:35:15Z</updated>

		<summary type="html">&lt;p&gt;Maxigas: Describe current backup situation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Current setup = &lt;br /&gt;
&lt;br /&gt;
We currently make a nightly backup of all containers from our virtual machine (called &amp;lt;code&amp;gt;ebro&amp;lt;/code&amp;gt;) to the virtual machine of calafou.org (called &amp;lt;code&amp;gt;anoia&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
We use the backup tool called &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt; through a package from the Debian repository.&lt;br /&gt;
&lt;br /&gt;
We wrote a script that performs that backup, which is located at &amp;lt;code&amp;gt;/usr/local/bin/backup.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The backup script runs every night around 4am, because we have put it in &amp;lt;code&amp;gt;cron&amp;lt;/code&amp;gt; (using the &amp;lt;code&amp;gt;sudo crontab -e&amp;lt;/code&amp;gt; command).&lt;br /&gt;
&lt;br /&gt;
In the cron job we redirect the script output to &amp;lt;code&amp;gt;/var/log/backup.log&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The script stops ALL the containers (to have enough RAM for running &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt; and to make sure that the databases and other volatile files inside the containers are not changing during the backup), backs up the containers, then starts the containers again.  Obviously, while the containers are stopped and the backup is running, the anarchaserver services are not available.  We have many ideas about how to do a backup without service interruption, but we have not implemented them yet.&lt;br /&gt;
&lt;br /&gt;
There are many possible improvements to this system: &lt;br /&gt;
&lt;br /&gt;
* Change remote: switch from calafou virtual machine to S14&lt;br /&gt;
* Optimise the script: rewrite the script to be a more beautiful program&lt;br /&gt;
* Test backup recovery: try to restore the backup to make sure it is possible&lt;br /&gt;
* Change the backup tool: use &amp;lt;code&amp;gt;borgbackup&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;duplicity&amp;lt;/code&amp;gt;&lt;br /&gt;
* Use a backup manager such as &amp;lt;code&amp;gt;backupninja&amp;lt;/code&amp;gt;&lt;br /&gt;
* Etc. &lt;br /&gt;
&lt;br /&gt;
= Older notes =&lt;br /&gt;
&lt;br /&gt;
STEP 1&lt;br /&gt;
check data usage&lt;br /&gt;
df -h&lt;br /&gt;
&lt;br /&gt;
STEP 2&lt;br /&gt;
check access to another virtual machine&lt;br /&gt;
&lt;br /&gt;
STEP 3&lt;br /&gt;
start screen session in root&lt;br /&gt;
&lt;br /&gt;
STEP 4&lt;br /&gt;
copy data to virtual machine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rsync -ravz --progress --exclude &amp;quot;/proc&amp;quot; --exclude &amp;quot;/sys&amp;quot; --exclude &amp;quot;/dev&amp;quot; -e &amp;quot;ssh -p 8022&amp;quot; / root@188.210.92.35:/var/backups/vm/anarcha &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
r (recursive)&lt;br /&gt;
a (archive - for special files)&lt;br /&gt;
v (verbose)&lt;br /&gt;
z (compressed)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
STEP 5&lt;br /&gt;
diagnostics&lt;br /&gt;
&lt;br /&gt;
watch&lt;br /&gt;
watch -n 180 &amp;quot;du -sh /var/backups/vm/anarcha&amp;quot;&lt;br /&gt;
&lt;br /&gt;
proc/kcore is a special directory which is created each time the computer boots&lt;br /&gt;
so we have to exclude it from the rsync command&lt;br /&gt;
&lt;br /&gt;
bwm-ng&lt;br /&gt;
we want to know whether the data is arriving and at which speed, data amount&lt;br /&gt;
http://linux.die.net/man/1/bwm-ng&lt;br /&gt;
&lt;br /&gt;
apt-get install bwm-ng&lt;/div&gt;</summary>
		<author><name>Maxigas</name></author>
	</entry>
</feed>